View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
15501 | Bug reports | Expression Manager | public | 2019-10-31 09:57 | 2021-03-10 23:03 |
Reporter | AlbanCatry | Assigned To | ollehar | ||
Priority | none | Severity | minor | ||
Status | closed | Resolution | not fixable | ||
Product Version | 3.19.2 | ||||
Summary | 15501: relevanceStatus : different evaluation in JS and PHP | ||||
Description | When comparing SomeQuestion.relevanceStatus to an integer (eg SomeQuestion.relevanceStatus == 0 or SomeQuestion.relevanceStatus == 1) and use it in a future relevance equation, the answers may be displayed and not be saved. | ||||
Steps To Reproduce | An example .lss file is here : https://www.limesurvey.org/forum/can-i-do-this-with-limesurvey/119540-using-relevancestatus-in-relevance-equations-of-further-questions | ||||
Additional Information | I am using LimeSurvey Professional and I don't know how to get Database and PHP version | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 6 | ||||
Complete LimeSurvey version number (& build) | 3.9.3 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | unknown | ||||
Server OS (if known) | |||||
Webserver software & version (if known) | |||||
PHP Version | unknown | ||||
related to | 15405 | closed | ollehar | Bug reports | Numerical vs alphabetical order in EM, <, >, vs strcmp etc |
related to | 07805 | closed | DenisChenu | Bug reports | Comparaison String and Numeric is different in same page and other page |
related to | 12613 | closed | ollehar | Bug reports | Condition NAOK >= " " (no answer) evaluated differently in JS/PHP |
related to | 15532 | closed | DenisChenu | Feature requests | Show warnings when implicit alphabetical compare is used in expressions |
Here the 2 surveys , @ollehar : The issue is (again) a compare difference between JS and PHP |
|
Thanks, have to make another test for this. |
|
Remind |
|
Why would you use ">=" in such a case? Should be == or != |
|
But again: Using >, <, ... on string should give warning. |
|
@ollehar : using ! is OK here. It's not the point on the way to fix … see the limesurvey_survey_relevanceStatusCompareFixedOK.lss file The point is : it must be same in PHP and JS :). |
|
Impossible without a virtual machine, and NOT enough! Feel free to try, though. But personally I feel more motivated to do a warning system. Will check the surveys. |
|
PS. A virtual machine can be a very small piece of code: https://github.com/GedRap/xs-vm Instead of generating JS, the EM could pass tokens to the browser which are then evaluated the same way as in PHP. DS. |
|
The develop version of Sam Moussa some year ago do JS in ajax : then NO difference between JS and PHP : all is done with PHP . Most easy to create new function : only PHP needed etc … etc … :D |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2019-10-31 09:57 | AlbanCatry | New Issue | |
2019-10-31 10:19 | DenisChenu | File Added: limesurvey_survey_relevanceStatusCompareFixedOK.lss | |
2019-10-31 10:19 | DenisChenu | File Added: limesurvey_survey_relevanceStatusCompareKO.lss | |
2019-10-31 10:19 | DenisChenu | Note Added: 54296 | |
2019-10-31 10:20 | DenisChenu | Relationship added | related to 15405 |
2019-10-31 10:21 | DenisChenu | Relationship added | related to 07805 |
2019-10-31 10:21 | DenisChenu | Relationship added | related to 12613 |
2019-11-01 10:03 | ollehar | Note Added: 54307 | |
2019-11-01 10:52 | DenisChenu | Note Added: 54314 | |
2019-11-01 12:58 | ollehar | Note Added: 54317 | |
2019-11-01 12:58 | ollehar | Note Added: 54318 | |
2019-11-01 13:02 | DenisChenu | Note Added: 54319 | |
2019-11-01 13:08 | ollehar | Note Added: 54320 | |
2019-11-01 13:19 | ollehar | Note Added: 54321 | |
2019-11-08 15:54 | DenisChenu | Relationship added | related to 15532 |
2020-01-07 15:39 | jelo | Issue Monitored: jelo | |
2020-01-07 17:34 | DenisChenu | Note Added: 55142 | |
2021-03-10 23:03 | ollehar | Assigned To | => ollehar |
2021-03-10 23:03 | ollehar | Status | new => closed |
2021-03-10 23:03 | ollehar | Resolution | open => not fixable |
2021-08-02 16:13 | guest | Bug heat | 4 => 6 |