View Issue Details

This issue affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
05623Bug reportsSurvey participants (Tokens)public2012-01-31 01:36
Reporteruser16048Assigned Toc_schmitz  
PrioritynormalSeverityminor 
Status closedResolutionno change required 
Summary05623: When importing token with usesleft=null usesleft is set to 0 instead of 1
Description

I added an attribute_1 column in the token management. I then exported a csv file with no tokens (headers only). I then added some user account strings to the attribute_1 column to the exported csv file and imported it back to LimeSurvey. The standard values for "invited", "reminded", "remindercount" and "completed" seem to be correct. But "usesleft" was set to 0 which doesn't make any sense if a participant has to take part in the survey. The standard value in the database table seems to be 1 but it doesn't seem to work when importing via the import csv feature.

Steps To Reproduce

Do as I mentiond in the description.

Additional Information

Screenshot and sample csv file are added as files to this issue.
I'm not sure but I think the problem lies in /admin/tokens.php arround line 2699:
"if ($subaction == "upload" && bHasSurveyPermission($surveyid, 'tokens','import'))"

TagsNo tags attached.
Attached Files
tokens_29938.csv (287 bytes)   
"tid","firstname","lastname","email","emailstatus","token","language","validfrom","validuntil","invited","reminded","remindercount","completed","usesleft"," attribute_1 <U-Kennung>"," attribute_2 <Attribute 2>"
,,,,,,,,,,,,,,"U1234",
,,,,,,,,,,,,,,"U1235",
,,,,,,,,,,,,,,"U1236",
tokens_29938.csv (287 bytes)   
LSTokenZeroUses.jpg (48,417 bytes)   
LSTokenZeroUses.jpg (48,417 bytes)   
Bug heat2
Complete LimeSurvey version number (& build)11379
I will donate to the project if issue is resolvedNo
BrowserMozilla Firefox 8.0
Database type & versionmysql
Server OS (if known)Windows XP
Webserver software & version (if known)xampp
PHP Version5.3.8
Git branch / Pull Request URL

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2012-01-31 01:36

administrator   ~17097

If you want to have the default set correctly just don't import the field at all or use the right value, everything else ist just guessing by the software.

Issue History

Date Modified Username Field Change
2011-12-08 16:26 user16048 New Issue
2011-12-08 16:26 user16048 File Added: tokens_29938.csv
2011-12-08 16:28 user16048 File Added: LSTokenZeroUses.jpg
2011-12-29 19:27 c_schmitz Assigned To => c_schmitz
2011-12-29 19:27 c_schmitz Status new => assigned
2012-01-31 01:36 c_schmitz Note Added: 17097
2012-01-31 01:36 c_schmitz Status assigned => closed
2012-01-31 01:36 c_schmitz Resolution open => no change required
2016-12-08 10:39 c_schmitz Category Tokens => Survey participants (Tokens)