View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
08324 | Bug reports | Expression Manager | public | 2013-10-30 21:51 | 2019-10-14 16:38 |
Reporter | sammousa | Assigned To | DenisChenu | ||
Priority | high | Severity | partial_block | ||
Status | closed | Resolution | fixed | ||
Product Version | 2.05 RC | ||||
Target Version | 2.05 RC | Fixed in Version | 2.05+ | ||
Summary | 08324: Broken numeric interpretation of answer codes. | ||||
Description | The fix you applied here: https://github.com/LimeSurvey/LimeSurvey/commit/28d42568d7fc2994041b11a5ba70f36d77affc74 breaks numeric interpretation of answer codes. | ||||
Steps To Reproduce |
Question q3 has the formula q1+q2 but will show things like 11, 12 instead of 2 and 3, applying concatenation instead of addition. | ||||
Additional Information | Simple test survey attached. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 6 | ||||
Complete LimeSurvey version number (& build) | 3e257de1c0534bb1ba4150810536 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | Chrome | ||||
Database type & version | MySQL5.5 | ||||
Server OS (if known) | Win7 | ||||
Webserver software & version (if known) | PHP | ||||
PHP Version | 5.5 | ||||
parent of | 10860 | closed | DenisChenu | Regular expression fail (2.06+) |
related to | 14337 | closed | DenisChenu | Broken numeric interpretation of answer codes |
child of | 07805 | closed | DenisChenu | Comparaison String and Numeric is different in same page and other page |
Hi, Yes , but Answer code is code, not numeric , no ? I think it's a bad solution to force whole to be numeric. It can be reverse, but then suremy some other bug with comparaison. We can use sum if needed ? |
|
Whe tryning to impor your lss in mast 205 and last 200: simplexml_load_file(): ./205/tmp/sm76bcc7x5z38f6dv5ud.lss:432: parser error : Extra content at the end of the document Due to debug: have to fix |
|
Uploaded a new lss file showing difference with numeric/not numeric : maybe the solution is: 1) Force to be numeric, and if not : set both in string. |
|
I think a plus (+) character should be used for numeric only and the operators should be automatically forced to be numeric. If one of the operators could not be enforced to be See also: http://php.net/manual/en/language.types.type-juggling.php |
|
Fix committed to 2.05 branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=13397 |
|
Then need fix in JS only (and see what to to with lt/gt ...) |
|
Hi, Then solution is: But need lt,gt .. need comparison fix too here. |
|
OK, Looking at public function GetJavaScriptEquivalentOfExpression We get BINARYOP at $token[1] , and can do some update if $token[2]=="+" Maybe use "+" in Anything + Anythingelse force Anything to be numeric is the good way. Need to have clean comparaison : Like PHP or not ? |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=29025 |
|
Ban '+' on strings. |
|
Show warning to use "join" instead of "+" or ".". |
|
Mantis link to github is broken ass bullshit fuckery >< |
|
@ollehar : no … it work … https://bugs.limesurvey.org/view.php?id=14198 But send an warning for |
|
BAN BAN BAN! |
|
LimeSurvey: 2.05 2ff91165 2013-10-31 14:16 Details Diff |
Dev: fixed issue 08324: Broken numeric interpretation of answer codes. Dev: this reopen 07805: because "1" is string in JS |
Affected Issues 07805, 08324 |
|
mod - application/helpers/expressions/em_core_helper.php | Diff File | ||
mod - scripts/expressions/em_javascript.js | Diff File | ||
LimeSurvey: master 63765d27 2019-06-11 21:07 Committer: GitHub Details Diff |
Fixed issue 14337: Comparaison String and Numeric is different in same page and other page Dev: Fixed issue 08324: Broken numeric interpretation of answer codes. Dev: If can be number : return a number in JS Dev: JS with number+"" do a compare by string : then same for PHP Dev: adding a Survey test |
Affected Issues 08324, 14337 |
|
mod - application/helpers/expressions/em_core_helper.php | Diff File | ||
mod - assets/scripts/expressions/em_javascript.js | Diff File | ||
add - tests/data/surveys/limesurvey_survey_checkCompareTestSurvey.lss | Diff File | ||
add - tests/helpers/JsPhpCompareTest.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-10-30 21:51 | sammousa | New Issue | |
2013-10-30 21:51 | sammousa | Status | new => assigned |
2013-10-30 21:51 | sammousa | Assigned To | => DenisChenu |
2013-10-30 21:51 | sammousa | File Added: limesurvey_survey_673882.lss | |
2013-10-31 10:11 | DenisChenu | Relationship added | child of 07805 |
2013-10-31 10:14 | DenisChenu | Note Added: 27049 | |
2013-10-31 11:40 | DenisChenu | Note Added: 27054 | |
2013-10-31 11:42 | DenisChenu | Note Edited: 27054 | |
2013-10-31 12:16 | DenisChenu | File Added: limesurvey_survey_numeric-again.lss | |
2013-10-31 12:29 | DenisChenu | Note Added: 27055 | |
2013-10-31 12:33 | DenisChenu | Note Edited: 27055 | |
2013-10-31 13:36 | c_schmitz | Note Added: 27056 | |
2013-10-31 14:16 | DenisChenu | Changeset attached | => LimeSurvey 2.05 2ff91165 |
2013-10-31 14:16 | DenisChenu | Note Added: 27057 | |
2013-10-31 14:16 | DenisChenu | Resolution | open => fixed |
2013-10-31 14:28 | DenisChenu | Note Added: 27058 | |
2013-10-31 14:28 | DenisChenu | Assigned To | DenisChenu => |
2013-11-03 16:28 | DenisChenu | Note Added: 27071 | |
2013-11-04 10:54 | DenisChenu | Note Added: 27076 | |
2013-11-04 10:57 | DenisChenu | Note Edited: 27076 | |
2013-11-04 10:59 | DenisChenu | Note Edited: 27076 | |
2013-11-04 22:24 | DenisChenu | Assigned To | => DenisChenu |
2013-11-15 19:05 | DenisChenu | Note Added: 27203 | |
2013-11-15 19:05 | DenisChenu | Status | assigned => closed |
2013-11-15 19:05 | DenisChenu | Fixed in Version | => 2.05+ |
2016-04-11 14:26 | DenisChenu | Relationship added | parent of 10860 |
2018-12-11 15:34 | DenisChenu | Relationship added | related to 14337 |
2019-06-28 12:27 | DenisChenu | Changeset attached | => LimeSurvey master 63765d27 |
2019-06-28 12:27 | DenisChenu | Note Added: 52635 | |
2019-10-14 16:30 | ollehar | Note Added: 54039 | |
2019-10-14 16:31 | ollehar | Note Added: 54040 | |
2019-10-14 16:31 | ollehar | Note Added: 54041 | |
2019-10-14 16:31 | DenisChenu | Note Added: 54042 | |
2019-10-14 16:31 | DenisChenu | Note Edited: 54042 | |
2019-10-14 16:38 | ollehar | Note Added: 54043 |