View Issue Details

This bug affects 1 person(s).
 10
IDProjectCategoryView StatusLast Update
09461Bug reportsCentral participant databasepublic2016-02-16 22:48
Reportergab79 Assigned Toc_schmitz  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.05+ 
Fixed in Version2.06+ 
Summary09461: share a participant without selecting a user
Description

When using the Participant Panel is allowed to share a participant without selecting an users, allowing the creation of records in participant_shares where share_uid=0.

Steps To Reproduce
  • Select a user in the participant list
  • Click on share participant with other users
  • Click share on the popup
  • A record like df0a3656-fee9-45e7-ae28-cfca3168b4d5,0,2015-01-16 14:28:21,true
Additional Information

When using the sharePanel there is an error in getShareInfo_json

<h1>PHP Error [8]</h1>
<p>Undefined offset: 0 (/var/www/limesurvey/application/controllers/admin/participantsaction.php:323)</p>
<pre>#0 /var/www/limesurvey/application/controllers/admin/participantsaction.php(323): LSYii_Application->handleError()
#1 unknown(0): participantsaction->getShareInfo_json()

TagsNo tags attached.
Bug heat10
Complete LimeSurvey version number (& build)20141229
I will donate to the project if issue is resolvedNo
BrowserMozilla Firefox
Database type & version178
Server OS (if known)RHEL 6
Webserver software & version (if known)2.2.15
PHP Version5.3.3

Users monitoring this issue

There are no users monitoring this issue.

Activities

ttenbergen

ttenbergen

2015-01-27 04:58

reporter   ~31490

What effect does this have? I have been hoping for a while that there would eventually be a way to share with "all". Hopefully if that ever gets implemented it will be more intuitive than this, though...?

gab79

gab79

2015-01-28 12:09

reporter   ~31498

@ttemberg: indeed I discovered this bug while searching for a way to share a contact with all. As I need to share some contacts among all my users I'm developing a patch for a "public" attribute http://bugs.limesurvey.org/view.php?id=9469 I'd like to know if your use case is the same as mine.

ttenbergen

ttenbergen

2015-01-29 19:12

reporter   ~31554

@Gab79: That is EXACTLY what I was hoping for. In our scenario I would like to share all of the participants, and having people unable to edit/fix them is causing us all sorts of problems. For us it would be best if "share with public" was the default when adding a participant since not all our clerks understand what is involved.

gab79

gab79

2015-02-03 16:46

reporter   ~31621

The error in the sharePanel is because in the following code

        foreach ($records as $row)
        {
            $oShared = User::model()->getName($row['share_uid']); //for conversion of uid to human readable names
            $owner = User::model()->getName($row['owner_uid']);
            $aData->rows[$i]['id'] = $row['participant_id'].&quot;--&quot;.$row['share_uid']; //This is the unique combination per record
            $aData->rows[$i]['cell'] = array($row['firstname'], $row['lastname'], $row['email'], $oShared[0]['full_name'], $row['share_uid'], $owner[0]['full_name'], $row['date_added'], $row['can_edit']);
            $i++;
        }

we have a $row['share_uid'] == '0' when we iterate on the "null user share" and then there is no $oShared[0]

Mazi

Mazi

2015-04-01 12:11

updater   ~31937

Denis, can you please check the suggested fix and implement it if it looks fine to you?
Feel free to assign this one to Carsten if you are unsure.

DenisChenu

DenisChenu

2015-04-01 13:15

developer   ~31938

I never work on Participant except yesterday ;) (on 2.06). I don't know the code of Participant .

c_schmitz

c_schmitz

2015-08-24 13:47

administrator   ~32996

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=15782

c_schmitz

c_schmitz

2015-08-24 13:55

administrator   ~32997

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=15783

c_schmitz

c_schmitz

2015-09-30 11:01

administrator   ~33237

Version 2.06+ Build 150930 released

gab79

gab79

2016-02-16 22:48

reporter   ~35274

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=17448

Related Changesets

LimeSurvey: master 371376a9

2015-08-24 11:47:17

c_schmitz

Details Diff
Fixed issue 09461: Can share a participant without selecting a user Affected Issues
09461
mod - application/views/admin/participants/displayParticipants_view.php Diff File
mod - scripts/admin/participantdisplay.js Diff File

LimeSurvey: master 5821f3d5

2015-08-24 11:53:56

c_schmitz

Details Diff
Fixed issue 09461: Can share a participant without selecting a user Affected Issues
09461
mod - application/controllers/admin/participantsaction.php Diff File

LimeSurvey: master f7f014e2

2016-02-16 21:22:20

gab79

Details Diff
Fixed issue 09461: share a participant without selecting a user
Dev public participants in CPDB: allows sharing a participant with all the users
Affected Issues
09461
mod - application/controllers/admin/participantsaction.php Diff File
mod - application/models/Participant.php Diff File
mod - application/views/admin/participants/displayParticipants_view.php Diff File

Issue History

Date Modified Username Field Change
2015-01-16 14:30 gab79 New Issue
2015-01-27 04:58 ttenbergen Note Added: 31490
2015-01-28 12:09 gab79 Note Added: 31498
2015-01-29 19:12 ttenbergen Note Added: 31554
2015-02-03 16:46 gab79 Note Added: 31621
2015-04-01 12:10 Mazi Assigned To => DenisChenu
2015-04-01 12:10 Mazi Status new => assigned
2015-04-01 12:11 Mazi Note Added: 31937
2015-04-01 13:15 DenisChenu Note Added: 31938
2015-04-01 13:15 DenisChenu Assigned To DenisChenu => c_schmitz
2015-08-24 13:47 c_schmitz Status assigned => resolved
2015-08-24 13:47 c_schmitz Fixed in Version => 2.06+
2015-08-24 13:47 c_schmitz Resolution open => fixed
2015-08-24 13:47 c_schmitz Changeset attached => LimeSurvey master 371376a9
2015-08-24 13:47 c_schmitz Note Added: 32996
2015-08-24 13:55 c_schmitz Changeset attached => LimeSurvey master 5821f3d5
2015-08-24 13:55 c_schmitz Note Added: 32997
2015-09-30 11:01 c_schmitz Note Added: 33237
2015-09-30 11:01 c_schmitz Status resolved => closed
2016-02-16 22:48 gab79 Changeset attached => LimeSurvey master f7f014e2
2016-02-16 22:48 gab79 Note Added: 35274