View Issue Details

This issue affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
06431Bug reportsSurvey participants (Tokens)public2012-08-15 01:01
Reporterlolo Assigned Tojcleeland  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.00RC8 
Summary06431: It should not be possible to copy tokens back to the panel if they're already coming from it
Description

LS 2.0 currently allows the following operation:

  • create a participant 'joe' in panel db
  • add participant 'joe' to survey 'x'
  • edit tokens of survey 'x'
  • add token 'joe' back to panel (using "Add participants to central database")

=> this leads to a CDbException (see below).

I guess this operation should be forbidden, in that tokens matching participants already in the panel db should be filtered out during that operation.

CDbException
CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'bbec4f9c-092e-4cfb-83fa-2176ee8c18ce' for key 'PRIMARY'. The SQL statement executed was: INSERT INTO lime_participants (participant_id, firstname, lastname, email, language, blacklisted, owner_uid) VALUES (:participant_id, :firstname, :lastname, :email, :language, :blacklisted, :owner_uid)

Steps To Reproduce

See description. If description is not sufficient I can provide more detailed steps.

TagsNo tags attached.
Bug heat8
Complete LimeSurvey version number (& build)120721
I will donate to the project if issue is resolvedNo
BrowserMozilla 14.0.1 (Win)
Database type & versionMysql 5.5.24
Server OS (if known)Linux 2.6.27.52
Webserver software & version (if known)Apache 2
PHP Version5.3.14
Git branch / Pull Request URL

Users monitoring this issue

abita1

Activities

jcleeland

jcleeland

2012-08-07 06:28

reporter   ~20237

The intention is that if you copy a participant from the tokens table back to the participants table, the system will recognise that they already exist, and then update any attributes, but otherwise leave the participant as is.

I'll check this error and see if I can fix it.

Jason

abita1

abita1

2012-08-08 15:12

reporter   ~20281

Last edited: 2012-08-08 15:28

Since you're there . . . would an "update / overwrite / cancel" dialog become appropriate before taking any step? Or an "Update / Cancel" ?

jcleeland

jcleeland

2012-08-09 08:47

reporter   ~20298

@abita1: Yep, this functionality is available already - when mapping attributes back to the central participants database you can choose whether or not to overwrite data.

@lolo: I can't replicate this problem - the script correctly does not attempt to create a new participant in the CPDB when copying from a tokens table back to the central database. Can you confirm you're using RC8, and let me know if the tokens table/survey you are using was upgraded from a previous version, or if it was created in this version of LS 2?

lolo

lolo

2012-08-09 10:18

reporter   ~20299

@Jason: You may be right. I am currently testing git version from 2012-08-08. I did re-create the tokens table (to make sure it was fresh) and tried it again => could not get the error again. I believe this issue can be closed.

Issue History

Date Modified Username Field Change
2012-08-05 17:37 lolo New Issue
2012-08-05 17:50 c_schmitz Assigned To => jcleeland
2012-08-05 17:50 c_schmitz Status new => assigned
2012-08-07 06:28 jcleeland Note Added: 20237
2012-08-08 15:12 abita1 Note Added: 20281
2012-08-08 15:13 abita1 Issue Monitored: abita1
2012-08-08 15:28 abita1 Note Edited: 20281
2012-08-09 08:47 jcleeland Note Added: 20298
2012-08-09 10:18 lolo Note Added: 20299
2012-08-15 01:01 jcleeland Status assigned => closed
2012-08-15 01:01 jcleeland Resolution open => fixed
2016-12-08 10:39 c_schmitz Category Tokens => Survey participants (Tokens)
2021-08-05 14:14 guest Bug heat 6 => 8