View Issue Details

This issue affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
07721Bug reportsSurvey participants (Tokens)public2013-04-01 17:33
Reporterjackson1 Assigned Toc_schmitz  
PrioritynormalSeverityminor 
Status closedResolutionwon't fix 
Product Version2.00+ 
Summary07721: Token duplication
Description

When creating tokens via the web interface, if you try to create a token that is already in the database, you get an error of
There is already an entry with that exact token in the table. The same token cannot be used in multiple entries.

However, if you create the token via the API, it will allow you to create the same token more than once.

Steps To Reproduce

$myJSONRPCClient = new jsonRPCClient( LS_BASEURL.'/index.php/admin/remotecontrol' );

$sessionKey= $myJSONRPCClient->get_session_key( LS_USER, LS_PASSWORD );

$data = array();
$data['participantData'] = array('token'=>'abc','firstname'=>'name');
$res= $myJSONRPCClient->add_participants( $sessionKey, $survey_id,$data,0 );

print_r($res, null );

This should work the first time, but fail the second time it is run, as of now, it does not fail.

TagsNo tags attached.
Bug heat2
Complete LimeSurvey version number (& build)130325
I will donate to the project if issue is resolvedNo
BrowserNA
Database type & versionmysql
Server OS (if known)linux
Webserver software & version (if known)apache 2.2
PHP Version5.3
Git branch / Pull Request URL

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2013-04-01 17:33

administrator   ~24894

That's currently the intended behaviour for mass-insertion of tokens. We just assumed that you know what you are doing ;). Seriously, the add_participants function currently lacks to set an according duplication filter, but if you check on the mass-import of tokens on the GUI you will notice that checking for duplication tokens is completely optional there, too.
Added a hint to the documentation.

Issue History

Date Modified Username Field Change
2013-03-31 19:37 jackson1 New Issue
2013-04-01 17:33 c_schmitz Note Added: 24894
2013-04-01 17:33 c_schmitz Status new => closed
2013-04-01 17:33 c_schmitz Assigned To => c_schmitz
2013-04-01 17:33 c_schmitz Resolution open => won't fix
2016-12-08 10:39 c_schmitz Category Tokens => Survey participants (Tokens)