View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
04993Bug reportsImport/Exportpublic2011-03-10 12:28
Reporteryohann Assigned Tolemeur  
PrioritylowSeverityminor 
Status closedResolutionfixed 
Product Version1.91RC4 
Fixed in Version1.91RC5 
Summary04993: usesleft is not used during token importation
Description

the number of uses left in the csv file isn't used during importation, whatever the number is in csv file, it will always be 1 in the token table after importation

Steps To Reproduce

create a survey and a token table
set usesleft of one or more token to 1000
export a csv file
check you have 1000 in the usesleft column of csv file
delete all token of your token table
import the csv file
you have only 1 usesleft

Additional Information

none

TagsNo tags attached.
Attached Files
importToken.patch (659 bytes)   
--- tokens.php.orig	2011-03-03 14:36:32.705926005 +0100
+++ tokens.php	2011-03-03 14:37:09.969926001 +0100
@@ -2691,7 +2691,7 @@
             {
                 // Pick apart the first line
                 $buffer=removeBOM($buffer);
-                $allowedfieldnames=array('firstname','lastname','email','emailstatus','token','language', 'validfrom', 'validuntil');
+                $allowedfieldnames=array('firstname','lastname','email','emailstatus','token','language', 'validfrom', 'validuntil', 'usesleft');
                 $allowedfieldnames=array_merge($attrfieldnames,$allowedfieldnames);
                 
                 switch ($separator) {
importToken.patch (659 bytes)   
Bug heat6
Complete LimeSurvey version number (& build)9716
I will donate to the project if issue is resolvedNo
Browserfirefox
Database type & version145
Server OS (if known)Linux (Ubuntu)
Webserver software & version (if known)apache2
PHP Version5.3.3-1ubuntu9.3 with Suhosin-Patch (cli) (built: Jan 12 2011 16:08:14)

Users monitoring this issue

There are no users monitoring this issue.

Activities

yohann

yohann

2011-03-03 14:42

reporter   ~14311

Sorry i'm not sure how this bugtracker works but i send a patch (the header may be wrong..)
all it does is adding "usesleft" has a valid header for token csv.
this fixes the bug
cheers
yohann

lemeur

lemeur

2011-03-07 18:13

developer   ~14319

Thx for the bug reprot and fix.
Applied to rev 9849 and 9850

c_schmitz

c_schmitz

2011-03-10 12:28

administrator   ~14380

1.91RC5 released.

Issue History

Date Modified Username Field Change
2011-03-03 12:31 yohann New Issue
2011-03-03 14:40 yohann File Added: importToken.patch
2011-03-03 14:42 yohann Note Added: 14311
2011-03-07 16:55 Mazi Assigned To => lemeur
2011-03-07 16:55 Mazi Status new => assigned
2011-03-07 18:13 lemeur Note Added: 14319
2011-03-07 18:13 lemeur Status assigned => resolved
2011-03-07 18:13 lemeur Fixed in Version => 1.91RC5
2011-03-07 18:13 lemeur Resolution open => fixed
2011-03-10 12:28 c_schmitz Note Added: 14380
2011-03-10 12:28 c_schmitz Status resolved => closed