View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
12452 | Bug reports | Conditions | public | 2017-06-01 15:26 | 2017-10-09 13:45 |
Reporter | sickpig | Assigned To | c_schmitz | ||
Priority | none | Severity | partial_block | ||
Status | closed | Resolution | fixed | ||
Product Version | 2.64.x | ||||
Fixed in Version | 2.65.x | ||||
Summary | 12452: Conditional routing doesn't work, all vars are treated as string during comparison | ||||
Description | Hi On LS 2.65.1+170522 the conditions based on integer variable (e.g Numerical Input) do not work anymore. | ||||
Steps To Reproduce | Create two question in 2 different group roup Q1 and Q2. Q1: insert a number from 1 to +inf In Q1 insert 5 Click "Next" Q2 group page will be displayed but the Q2 question is not displayed. | ||||
Additional Information | Attached a survey example you can import to verify the issue. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 18 | ||||
Complete LimeSurvey version number (& build) | 2.65.1+170522 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | firefox, chrome, edge, opera | ||||
Database type & version | postgresql 9.5.7 | ||||
Server OS (if known) | Ubuntu Linux 16.04 | ||||
Webserver software & version (if known) | Apache 2.4.7 | ||||
PHP Version | 5.5.9 | ||||
I've reproduced the problem also on an ubuntu 16.04 using mysql 5.7, apache 2.14.18 and php 7.0.18 using the attached survey |
|
tested in "Version 2.59.1+170116" where it works as expected |
|
git bisected the code. the commit that introduced the regression is: 9748fa9b5bcad5eafae4a24b7cb94ed61cbfb788 is the first bad commit |
|
The relevance equation set in the 2nd question in the sample survey reads Q1 < "10" so the behaviour is correct. It is a dictionary comparison in that case It should read Q1<10 if you want a real numeric comparison. |
|
@c_schmitz : you rigfht, except "condition to exression" add the quote |
|
But why LS is putting quote around 10 if this is a response given to a numerical input. ? |
|
@c_schmitz : line 960 of em_manager : can add a test: if((string)floatval($value)!==(string) $value) { Seems OK ? |
|
Basically it is a bug in the Conditions to Relevance conversion that was uncovered now by my fix. |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=22921 |
|
https://github.com/LimeSurvey/LimeSurvey/commit/6320c3bb6340c088934f9fdbc8d0b2099681e37c ;). But still : all old survey can have this issue :( |
|
Thank you, Denis! Version 2.65.2 released. |
|
guys does this fix will take care of this regression: https://bugs.limesurvey.org/view.php?id=12456 |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=24018 |
|
LimeSurvey: master 6ed9fad1 2017-06-06 18:55 Details Diff |
Fixed issue 12452: Numeric vars are treated as string during comparison |
Affected Issues 12452 |
|
mod - scripts/expressions/em_javascript.js | Diff File | ||
LimeSurvey: master e1122b15 2017-10-09 15:45 opinioni
Committer: Details Diff |
Fix issue 12452: Conditional routing doesn't work on scale and array questions (#783) See https://bugs.limesurvey.org/view.php?id=12456 for more details |
Affected Issues 12452 |
|
mod - scripts/expressions/em_javascript.js | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-06-01 15:26 | sickpig | New Issue | |
2017-06-01 15:26 | sickpig | File Added: limesurvey_survey_495226.lss | |
2017-06-01 16:26 | sickpig | Note Added: 43791 | |
2017-06-05 10:17 | DenisChenu | Issue Monitored: DenisChenu | |
2017-06-05 10:54 | Deusdeorum | Note Added: 43805 | |
2017-06-05 12:16 | sickpig | Note Added: 43806 | |
2017-06-06 15:28 | DenisChenu | Relationship added | related to 12456 |
2017-06-06 16:25 | c_schmitz | Note Added: 43824 | |
2017-06-06 16:35 | DenisChenu | Note Added: 43825 | |
2017-06-06 16:35 | DenisChenu | File Added: Capture du 2017-06-06 16-34-53.png | |
2017-06-06 16:35 | DenisChenu | Relationship replaced | has duplicate 12456 |
2017-06-06 16:37 | sickpig | Note Added: 43827 | |
2017-06-06 16:41 | DenisChenu | Note Added: 43828 | |
2017-06-06 17:01 | c_schmitz | Note Added: 43829 | |
2017-06-06 17:01 | c_schmitz | Changeset attached | => LimeSurvey master 6ed9fad1 |
2017-06-06 17:01 | c_schmitz | Note Added: 43830 | |
2017-06-06 17:01 | c_schmitz | Assigned To | => c_schmitz |
2017-06-06 17:01 | c_schmitz | Resolution | open => fixed |
2017-06-06 17:16 | DenisChenu | Note Added: 43831 | |
2017-06-06 17:36 | c_schmitz | Status | new => closed |
2017-06-06 17:36 | c_schmitz | Fixed in Version | => 2.65.x |
2017-06-06 17:36 | c_schmitz | Note Added: 43832 | |
2017-06-06 20:09 | sickpig | Note Added: 43835 | |
2017-10-09 13:45 |
|
Changeset attached | => LimeSurvey master e1122b15 |
2017-10-09 13:45 |
|
Note Added: 44553 | |
2021-08-02 19:10 | guest | Bug heat | 16 => 18 |