View Issue Details

This issue affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
05973Bug reportsImport/Exportpublic2012-04-05 21:09
Reporteratiut Assigned ToTMSWhite  
PrioritynormalSeveritycrash 
Status closedResolutionno change required 
Product Version1.92+ 
Summary05973: Importing questions from 1.91 that make reference to tokens may block survey logic
Description

The third question in the survey attached has been imported from 1,91 and makes reference to the tokens table both in the question text and max value.

I have set it up to be conditioned by another question created from demonstrative purposes. The following happen:

  1. If the max value is set by token, then all questions that depend on conditions become hidden.
  2. If max value becomes blank, then other questions are shown/hidden correctly, while the third question remains hidden. Maybe it is due to the question text.
Additional Information

I am not sure whether this is realy a bug or I am doing something wrong.

TMSWhite has advised that I should file a ticket here.

TagsNo tags attached.
Attached Files
46149.jpg (109,838 bytes)
Bug heat6
Complete LimeSurvey version number (& build)120325
I will donate to the project if issue is resolvedNo
Browser
Database type & versionSQL
Server OS (if known)Linux
Webserver software & version (if known)n/a (LAMP)
PHP VersionPHP Version 5.3.6-13ubuntu3.6
Git branch / Pull Request URL

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2012-04-02 13:25

administrator   ~18158

There is no survey attached.

atiut

atiut

2012-04-02 13:27

reporter   ~18159

apologies

TMSWhite

TMSWhite

2012-04-02 13:41

reporter   ~18160

Last edited: 2012-04-02 13:46

This is not a but in LimeSurvey. There are errors in the survey file. Use the "Survey Logic File" button to see them. Screenshot attached.

There are two issues:
(1) rez will never be true, since condition never has the value "da"
(2)incentive_suma should have max_num_value_n = TOKEN:ATTRIBUTE_2, not {TOKEN:ATTRIBUTE_2}

atiut

atiut

2012-04-02 13:54

reporter   ~18161

Hi
(1) It would seem that survey logic will did not update itself when I translated "da" into "yes". Correcting this the translation, the error will persist.

(2) I can agree - this is exactly why I described is as an import error.
{TOKEN:ATTRIBUTE_2} worked just fine in 1.91, was accepted at import at 1.92 and stopped working at 1,92. However, the main issue is that it stopped survey logic from working.

I'll revise the file and re-attach.

TMSWhite

TMSWhite

2012-04-02 15:24

reporter   ~18163

The problem is still a bug in the survey. The value of advanced question attribute max_num_value_n should be "TOKEN:ATTRIBUTE_2", not "{TOKEN:ATTRIBUTE_2}".

I've tested it and with that fix, it works fine.

Also, max_num_value_n did not accept expressions in 1.91, so using {TOKEN:ATTRIBUTE_2} for max_num_value_n in 1.91 should not have worked - it was probably ignored.

If it still doesn't work for you, make sure to create the tokens table and populate it with ATTRIBUTE_2, otherwise the default value for ATTRIBUTE_2 will be 0, so your min/max criteria of 500/0 would not let you proceed.

c_schmitz

c_schmitz

2012-04-05 19:21

administrator   ~18235

Thomas, I am wondering why {TOKEN:ATTRIBUTE_2} would not work in 1.92? Isn't that a proper expression?
I would expect TOKEN:ATTRIBUTE_2 not to be working in this case.

TMSWhite

TMSWhite

2012-04-05 20:03

reporter   ~18237

TOKEN:ATTRIBUTE_2 is working. All min/max advanced question options are automatically expressions. So, rather than typing a max value of {5}, or {5*10}, or {TOKEN:ATTRIBUTE_2}, you enter those values without surrounding curly braces. This is how relevance works too - you don't explicitly put curly braces within it.

The curly braces are only used in situations where you are entering text and want to augment it with a expression.

c_schmitz

c_schmitz

2012-04-05 21:08

administrator   ~18238

OK, understood. Thank you for the explanation.

I think that using {TOKEN:ATTRIBUTE_2} might have worked in 1.91 as described, more or less accidentally though - was not an official feature :-).

Issue History

Date Modified Username Field Change
2012-04-02 09:29 atiut New Issue
2012-04-02 13:25 c_schmitz Note Added: 18158
2012-04-02 13:26 c_schmitz Assigned To => TMSWhite
2012-04-02 13:26 c_schmitz Status new => assigned
2012-04-02 13:27 atiut File Added: limesurvey_survey_46149.lss
2012-04-02 13:27 atiut Note Added: 18159
2012-04-02 13:41 TMSWhite Note Added: 18160
2012-04-02 13:44 TMSWhite File Added: 46149.jpg
2012-04-02 13:46 TMSWhite Note Edited: 18160
2012-04-02 13:47 TMSWhite Status assigned => resolved
2012-04-02 13:47 TMSWhite Resolution open => no change required
2012-04-02 13:54 atiut Note Added: 18161
2012-04-02 13:57 atiut File Added: limesurvey_survey_46149-b.lss
2012-04-02 15:24 TMSWhite Note Added: 18163
2012-04-05 19:21 c_schmitz Note Added: 18235
2012-04-05 19:21 c_schmitz Status resolved => feedback
2012-04-05 19:21 c_schmitz Resolution no change required => reopened
2012-04-05 20:03 TMSWhite Note Added: 18237
2012-04-05 21:08 c_schmitz Note Added: 18238
2012-04-05 21:09 c_schmitz Status feedback => closed
2012-04-05 21:09 c_schmitz Resolution reopened => no change required