View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
05859 | Bug reports | Import/Export | public | 2012-02-28 00:50 | 2012-03-14 21:08 |
Reporter | mmirasol | Assigned To | TMSWhite | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 1.92RC5 | ||||
Fixed in Version | 1.92+ | ||||
Summary | 05859: question group import does not update references properly | ||||
Description | I installed 1.92 RC5 on our test server and imported a completed survey created using Version 1.91+ Build 12416. After doing an initial test execute, I observed that the conditions I set up on q3 (type: radiolist with comment) based on s2 (type: radiolist) no longer works. The question setup is as follows: s2 (Yes/No) Even if I answer Yes for s2, q3 still shows up as Not Qualified so I put alert("{INSERTANS:(s2 sqga)}"); in q3 and it shows some html instead of the value of s2. please see attached file. After reviewing the relevance rules, I observed that the references are still that of my old survey, they were not reconfigured properly as necessary. I also observed that value returned by {INSERTANS:(sgqa)} is the question code in contrast to shown text in Version 1.91+ Build 12416. This renders my logic programming wrong. | ||||
Steps To Reproduce |
| ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 6 | ||||
Complete LimeSurvey version number (& build) | 12022 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | mysql Ver 14.14 Distrib 5.1.49, for debian-linux-gnu (x86_64) | ||||
Server OS (if known) | 2.6.35-32-server GNU/Linux Ubuntu Server x86 | ||||
Webserver software & version (if known) | Apache/2.2.16 (Ubuntu) | ||||
PHP Version | PHP 5.3.3-1ubuntu9.10 | ||||
That file is already corrupted - the SGQA codes for the logic don't match the rest (so it is guaranteed to import wrong). Can you please attach a file that does work, and we can test whether importing it leads to problems? |
|
When I manually re-create the conditions, export the file, and re-import it, all of the conditions convert properly, including the hidden JavaScript in question q3. Just did this twice (exporting/re-importing) without any trouble. There were some problems in older release candidates. Perhaps it was an issue there? I'm attaching the converted survey. I may not have the conditional logic exactly the same, but you get the idea. |
|
Hello Tom, I just attached the original survey created in Version 1.91+ Build 12416 with its theme. I imported this in Version 1.92 RC5 Build 120225 and the relevance rules and conditions look ok after the import. I even imported the survey again and the relevance and conditions look ok too. The issue is that q1 ("Congratulations...") does not appear even though it passes the conditions set. Importing the same survey and theme in Version 1.91+ Build 12416 works with no issues. |
|
Is it safe to assume that 1.92 should be backwards compatible and you should not have to redo conditions if you're importing a survey from an older version of lime? |
|
Yes, 1.92 is backwards compatible with three small but unavoidable exceptions: The reason q1 doesn't work in 1.92 is because your regular expressions are not properly formed. The generated relevance equation for q1 is: ((s2.NAOK == "A1") and (regexMatch("[1-2][0-9]", s3.NAOK) or regexMatch("[2-9]", s3.NAOK) or s3.NAOK == "30") and (s4.NAOK >= "30")) It should be: ((s2.NAOK == "A1") and (regexMatch("/[1-2][0-9]/", s3.NAOK) or regexMatch("/[2-9]/", s3.NAOK) or s3.NAOK == "30") and (s4.NAOK >= "30")) When I fix the two regular expressions in the conditions editor, the Congratulations message appears as expected. So, the fact that it works in 1.91 is actually a bug in 1.91. According the the documentation, regular expressions must always start and end with slashes - http://docs.limesurvey.org/Using+regular+expressions&structure=English+Instructions+for+LimeSurvey |
|
I just tested limesurvey_survey_22321.lss with a recent 1.91+ stable release. It doesn't work there either, so if there was a bug in regular expression processing in 1.91, it has been fixed. |
|
Since this is not a bug in 1.92, marking it as resolved. |
|
thank you for this. i just learned something new again. =) so i assume that if the regular expressions had the slashes in the original survey, it would have worked as it should when it was imported in 1.92? btw when you import questions / question groups with embedded INSERTANS is lime supposed to update those as well? |
|
Yes, it would have worked with the slashes (I tested to confirm). And yes, when importing, INSERTANS are supposed to be updated (but only if they point to a valid variable name to begin with). If you find any reproducible case where they are not being updated, please open a new bug ticket. |
|
will do. =) thanks. |
|
Hello Tom, http://docs.limesurvey.org/tiki-index.php?page=Using+Regular+Expressions says: I just wanted to let you know that it seems that the conditions work with or without the slashes in Version 1.92 Build 120303. =) |
|
Fixed with revision https://github.com/LimeSurvey/LimeSurvey/commit/f2f69355b18d887d3987f128d68aef9a6e88cca0 |
|
1.92+ Build 120211 released |
|
LimeSurvey: Yii c27de39d 2012-03-07 21:07:11 Details Diff |
Fixed issue 05859: question group import does not update references properly Dev regular expressions entered into the conditions designer can be entered with or without surrounding slashes. EM will add the surrounding slashes if needed. |
Affected Issues 05859 |
|
mod - application/helpers/expressions/em_manager_helper.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-02-28 00:50 | mmirasol | New Issue | |
2012-02-28 00:50 | mmirasol | File Added: limesurvey_survey_21126.lss | |
2012-02-28 00:51 | mmirasol | File Added: insertans-radio-list.JPG | |
2012-02-28 02:01 | TMSWhite | Note Added: 17668 | |
2012-02-28 02:22 | TMSWhite | Note Added: 17669 | |
2012-02-28 02:22 | TMSWhite | File Added: limesurvey_survey_13541.lss | |
2012-02-28 03:38 | mmirasol | File Added: limesurvey_survey_22321.lss | |
2012-02-28 03:38 | mmirasol | File Added: test2.zip | |
2012-02-28 03:47 | mmirasol | Note Added: 17670 | |
2012-02-28 03:50 | mmirasol | Note Added: 17671 | |
2012-02-28 03:50 | mmirasol | Note Edited: 17671 | |
2012-02-28 04:16 | TMSWhite | Note Added: 17672 | |
2012-02-28 04:24 | TMSWhite | Note Added: 17673 | |
2012-02-28 04:32 | TMSWhite | Note Added: 17674 | |
2012-02-28 04:32 | TMSWhite | Status | new => resolved |
2012-02-28 04:32 | TMSWhite | Resolution | open => no change required |
2012-02-28 04:32 | TMSWhite | Assigned To | => TMSWhite |
2012-02-28 04:32 | mmirasol | Note Added: 17675 | |
2012-02-28 04:35 | TMSWhite | Note Added: 17676 | |
2012-02-28 13:25 | mmirasol | Note Added: 17678 | |
2012-03-04 23:21 | c_schmitz | Status | resolved => closed |
2012-03-07 03:49 | mmirasol | Note Added: 17770 | |
2012-03-07 03:49 | mmirasol | Status | closed => feedback |
2012-03-07 03:49 | mmirasol | Resolution | no change required => reopened |
2012-03-07 17:58 | TMSWhite | Note Added: 17781 | |
2012-03-07 17:58 | TMSWhite | Status | feedback => resolved |
2012-03-07 17:58 | TMSWhite | Fixed in Version | => 1.92+ |
2012-03-07 17:58 | TMSWhite | Resolution | reopened => fixed |
2012-03-11 16:31 | c_schmitz | Note Added: 17832 | |
2012-03-11 16:31 | c_schmitz | Status | resolved => closed |
2012-03-14 21:08 | TMSWhite | Changeset attached | => Import 2012-03-09 13:30:34 Yii c27de39d |