View Issue Details

IDProjectCategoryView StatusLast Update
12980Development Survey takingpublic2017-12-07 18:20
ReportertpartnerAssigned ToLouisGac 
PrioritynoneSeveritymajor 
Status resolvedResolutionfixed 
Product Version3.x 
Target VersionFixed in Version 
Summary12980: Expression Manager broken
DescriptionExpression Manager seems to be broken.

I have tested with a survey (attached) that consists of:

- a multiple-choice with question code "Q1" and sub-questions "SQ001, SQ002..."

- an equation question with the following equations:
---- {!is_empty(Q1_SQ001)}
---- {Q1_SQ001 == 'Y'}

Neither of those work.
TagsNo tags attached.

Activities

tpartner

tpartner

2017-11-30 15:58

developer  

limesurvey_survey_454856.lss (15,794 bytes)
tpartner

tpartner

2017-11-30 16:02

developer   ~45208

...when imported into 2.72.5, it works.
olle

olle

2017-11-30 16:26

administrator   ~45210

Latest git pull?
olle

olle

2017-11-30 16:33

administrator   ~45211

Can confirm.
olle

olle

2017-12-01 14:05

administrator   ~45221

@DenisChenu, you know how to split sgqa variable in meaningful pieces? Problem is that you can't tell question code from answer code. Example:

123X234X1SQ0001

where question code is "1" and subquestion "SQ0001". But it can also be:

123X234X1123

where subquestion code is "123".
olle

olle

2017-12-01 14:06

administrator   ~45222

@DenisCheny Faulty line: https://github.com/LimeSurvey/LimeSurvey/blob/develop/assets/scripts/survey_runtime.js#L113
DenisChenu

DenisChenu

2017-12-01 14:25

developer   ~45224

@olle : NEVER use split with X for EM …
We don't use it in 2.6lts : https://github.com/LimeSurvey/LimeSurvey/blob/2.06lts/scripts/survey_runtime.js

@LouisGac : https://github.com/LimeSurvey/LimeSurvey/commit/f48151539a7bc5ad5cc012a9f446981b51b7374e
Must find qid elsewhere, it's not in an EM javascript var some where ? Else we can have with $("[name='"+name+"']").closest( … etc …
olle

olle

2017-12-01 14:26

administrator   ~45225

Fix committed to develop branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=25312
olle

olle

2017-12-01 14:28

administrator   ~45226

@DenisChenu, what do you think about looking in LEMvarNameAttr? https://github.com/LimeSurvey/LimeSurvey/blob/develop/assets/scripts/survey_runtime.js#L115
DenisChenu

DenisChenu

2017-12-01 14:32

developer   ~45227

Last edited: 2017-12-01 14:33

View 2 revisions

@olle : yes ! :+1:
[EDIT] maybe we need jsName_on OR jsName ?

PS : i thik we must send a better json for EM with better information, but find information on each element here seems the best.

PS2: i think LEMvarNameAttr['java' + name] is defined ONLY if in same page ? Or maybe we can know if it's in same page or not here ?
We use something in https://github.com/LimeSurvey/LimeSurvey/blob/develop/assets/scripts/expressions/em_javascript.js#L543 to know if a var is on same page or not.

LouisGac

LouisGac

2017-12-07 18:20

developer   ~45266

Fix committed to develop branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=25411

Related Changesets

LimeSurvey: develop e6303150

2017-12-01 14:26:05

olle

Details Diff
Fixed issue 12980: Expression Manager broken
mod - assets/scripts/survey_runtime.js Diff File

LimeSurvey: develop 7c7d4203

2017-12-07 18:19:54

LouisGac

Details Diff
Fixed issue 12980: Expression Manager broken
mod - assets/scripts/survey_runtime.js Diff File

Issue History

Date Modified Username Field Change
2017-11-30 15:58 tpartner New Issue
2017-11-30 15:58 tpartner File Added: limesurvey_survey_454856.lss
2017-11-30 16:02 tpartner Note Added: 45208
2017-11-30 16:26 olle Note Added: 45210
2017-11-30 16:33 olle Note Added: 45211
2017-12-01 12:28 olle Assigned To => olle
2017-12-01 12:28 olle Status new => assigned
2017-12-01 14:05 olle Note Added: 45221
2017-12-01 14:06 olle Note Added: 45222
2017-12-01 14:25 DenisChenu Note Added: 45224
2017-12-01 14:26 olle Changeset attached => LimeSurvey develop e6303150
2017-12-01 14:26 olle Note Added: 45225
2017-12-01 14:26 olle Resolution open => fixed
2017-12-01 14:28 olle Note Added: 45226
2017-12-01 14:32 DenisChenu Note Added: 45227
2017-12-01 14:33 DenisChenu Note Edited: 45227 View Revisions
2017-12-04 10:58 olle Status assigned => resolved
2017-12-07 18:20 LouisGac Changeset attached => LimeSurvey develop 7c7d4203
2017-12-07 18:20 LouisGac Note Added: 45266
2017-12-07 18:20 LouisGac Assigned To olle => LouisGac