View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
14486Bug reportsExpression Managerpublic2022-07-20 11:28
Reporterludogre Assigned To 
PrioritylowSeveritypartial_block 
Status feedbackResolutionopen 
Product Version3.15.x 
Summary14486: .question suffix broke usage of if function
Description

Hi!

I've got an issue with a conditionnal expression. The survey always returns the value if it's false, even if the condition is true.

Steps To Reproduce

You can test it here: https://questionnaires.heureux-cyclage.org/index.php?r=survey/index&sid=685936&lang=fr
Change values in the second question and see the last line of the last "question". Condition never change.

Additional Information

Here is the js debug message:

LSLOG TypeError: "string is undefined"
htmlspecialchars_decode https://questionnaires.heureux-cyclage.org/tmp/assets/d650b200/em_javascript.js:1482
LEMval https://questionnaires.heureux-cyclage.org/tmp/assets/d650b200/em_javascript.js:685
LEMrel9567 https://questionnaires.heureux-cyclage.org/index.php?r=survey/index&sid=685936&lang=fr:232
ExprMgr_process_relevance_and_tailoring https://questionnaires.heureux-cyclage.org/index.php?r=survey/index&sid=685936&lang=fr:182
checkconditions https://questionnaires.heureux-cyclage.org/tmp/assets/bbe4b4d7/survey_runtime.js:128
<anonymous> https://questionnaires.heureux-cyclage.org/tmp/assets/bbe4b4d7/survey_runtime.js:23
dispatch7jQuery lslog.js:200:17

TagsNo tags attached.
Attached Files
Bug heat4
Complete LimeSurvey version number (& build)3.15.0
I will donate to the project if issue is resolvedNo
BrowserFirefox 65
Database type & versionmysql 5.5.62
Server OS (if known)Debian 8
Webserver software & version (if known)Nginx 1.6.2
PHP Version5.6.39

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2019-02-04 16:19

developer   ~50394

In 2.73 : no error in console, but broken too

DenisChenu

DenisChenu

2019-02-04 16:22

developer   ~50395

Last edited: 2021-02-08 13:08

Updated title : .question suffix broke usage of if function

gabrieljenik

gabrieljenik

2022-07-19 20:20

manager   ~71024

Hello ludogre,
This ticket has been open for quite some time.
Do you have any new info / feedback?
Can you please check if this issue still exists in the latest version of LimeSurvey and let us know?
Thank you!

DenisChenu

DenisChenu

2022-07-20 11:28

developer   ~71048

Still an issue in 3.X
Not in master

But master JS still want to get attr.question even if this one is not set : https://github.com/LimeSurvey/LimeSurvey/blob/1dc8b53e7942e624a89763401b39c11db4318de2/assets/packages/expressions/em_javascript.js#L1116

Then fixed elsewhere : surely here : https://github.com/LimeSurvey/LimeSurvey/blob/1dc8b53e7942e624a89763401b39c11db4318de2/application/helpers/expressions/em_core_helper.php#L43

Related to New feature 14206: Allow plugin to update expression knowVars where we need STATIC functions and var.

Issue History

Date Modified Username Field Change
2019-02-04 15:47 ludogre New Issue
2019-02-04 15:47 ludogre File Added: limesurvey_survey_685936.lss
2019-02-04 16:19 DenisChenu Note Added: 50394
2019-02-04 16:22 DenisChenu Category Conditions => Expression Manager
2019-02-04 16:22 DenisChenu Summary Only false value is return by my conditionnal expression => .question suffix broke usage of if function
2019-02-04 16:22 DenisChenu Note Added: 50395
2019-12-03 15:25 cdorin Assigned To => cdorin
2019-12-03 15:25 cdorin Status new => assigned
2021-02-08 13:08 cdorin Assigned To cdorin =>
2021-02-08 13:08 cdorin Priority none => low
2021-02-08 13:08 cdorin Status assigned => confirmed
2021-02-08 13:08 cdorin Sync to Zoho Project => |Yes|
2022-07-19 20:20 gabrieljenik Status confirmed => feedback
2022-07-19 20:20 gabrieljenik Note Added: 71024
2022-07-19 20:20 gabrieljenik Bug heat 2 => 4
2022-07-20 11:28 DenisChenu Note Added: 71048