Relationship Graph

Relationship Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

This bug affects 1 person(s).
 12
IDProjectCategoryView StatusLast Update
13317Bug reportsExpression Managerpublic2018-09-11 15:48
Reporterjelo Assigned ToDenisChenu  
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version3.1.x 
Fixed in Version3.3.x 
Summary13317: Equationquestion reference not directly updated in piped text.
Description

User posted demo survey, where a piped textfield (referenced from equation question) is only updated when entering a text in a different question. I was able to reproduce the issue on demo.limesurvey.org

https://www.limesurvey.org/forum/can-i-do-this-with-limesurvey/113603-text-display-not-dynamically-changing

The variables of the first two questions are not select-able in the question picker of the html editor of question 3.
Not sure if that is blocked inside one group.

TagsNo tags attached.
Attached Files
20180207.equationupdate.PNG (14,707 bytes)   
20180207.equationupdate.PNG (14,707 bytes)   
Bug heat12
Complete LimeSurvey version number (& build)3.1.1
I will donate to the project if issue is resolvedNo
Browser
Database type & versionN/A
Server OS (if known)N/A
Webserver software & version (if known)N/A
PHP VersionN/A

Relationships

related to 14047 closedDenisChenu Equation didn't update previous text 

Activities

jelo

jelo

2018-02-07 22:55

partner   ~46300

The surveyfile of the threadstarter.

DenisChenu

DenisChenu

2018-02-08 09:19

developer   ~46302

You mean :

  1. Have Q1 updated
  2. Q2 is an equation : updated by Q1
  3. Q3 reference Q2, not updated when Q2 is updated ?

If yes : i think i can confirm the «bug», nothing is triggered whan equation question type is updated

jelo

jelo

2018-02-08 09:35

partner   ~46303

Correct, that was the issue the threadstarter posted and tried to explain in the forum.

For me the question is:

  1. It's one group. What can we expect to work on one page. Since the update (Q3 shows value of equation of Q2) is working after typing text in Q4, it seems to be bug.

  2. The variable picker in the HTML-Editor is not allowing to choose Q1 and Q2, when editing Q3.
    Disabled, cause Q3 is in the same group as Q1 and Q2? Survey logic check is looking fine and piping is working on same page.
    Is the behavior of the variable picker intended?

DenisChenu

DenisChenu

2018-02-08 09:56

developer   ~46304

1: it's a bug, but an old bug
2: don't knpow the desired behaviour of EM picker. Think it must be rewrited from scratch (didn't use old SGQA, but clean QCODE.shown for example)

ollehar

ollehar

2018-02-08 11:32

administrator   ~46306

@DenisChenu is this an easy bug to fix?

DenisChenu

DenisChenu

2018-02-08 11:55

developer   ~46314

Didn't know, There are 2 solution

  1. Create a new javascript event htmlUpdate and use it in em.js
  2. After updating equation hidden part : launch a 'update' event https://github.com/LimeSurvey/LimeSurvey/blob/master/assets/scripts/expressions/em_javascript.js#L22 and attach update of EM for hidden input
  3. Update the views to launch EM update : https://github.com/LimeSurvey/LimeSurvey/blob/master/application/views/survey/questions/answer/equation/answer.php but i dislike to add javascript inside views.
DenisChenu

DenisChenu

2018-02-08 17:14

developer   ~46331

@olle : Pull request : https://github.com/LimeSurvey/LimeSurvey/pull/1001

Travis fealure seems unrelated : https://travis-ci.org/LimeSurvey/LimeSurvey/jobs/339015600#L766

user70560

2018-02-16 16:10

  ~46559

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

DenisChenu

DenisChenu

2018-02-16 17:54

developer   ~46564

develop

c_schmitz

c_schmitz

2018-02-21 16:46

administrator   ~46701

Version 3.4.1. released

DenisChenu

DenisChenu

2018-02-21 16:49

developer   ~46705

@c_schmitz : it's only in develop, but we don't have 3.5 or develop for Fixed in.

Related Changesets

LimeSurvey: develop a4ad7877

2018-02-16 16:10:28

user70560


Committer: GitHub Details Diff
Fixed issue 13317: Equation question reference not directly updated in piped text.

Dev: move em_javascript to expressions package
Dev: use trigger, and trigger in em_manager_helper
Dev: choose to hide equation part seems more template related (?)
Affected Issues
13317
mod - application/config/packages.php Diff File
mod - application/controllers/admin/export.php Diff File
mod - application/controllers/admin/expressions.php Diff File
mod - application/core/LS_Twig_Extension.php Diff File
mod - application/helpers/expressions/em_manager_helper.php Diff File
mod - application/helpers/qanda_helper.php Diff File
mod - application/views/survey/questions/answer/equation/answer.php Diff File
mod - tests/helpers/ExpressionCoreAux.php Diff File

Issue History

Date Modified Username Field Change
2018-02-07 22:54 jelo New Issue
2018-02-07 22:54 jelo File Added: 20180207.equationupdate.PNG
2018-02-07 22:54 jelo File Added: 20180207.variablesnotselectable.PNG
2018-02-07 22:55 jelo File Added: limesurvey_survey_726946.lss
2018-02-07 22:55 jelo Note Added: 46300
2018-02-08 07:27 thefan Issue Monitored: thefan
2018-02-08 09:20 DenisChenu Note Added: 46302
2018-02-08 09:35 jelo Note Added: 46303
2018-02-08 09:56 DenisChenu Note Added: 46304
2018-02-08 11:32 ollehar Note Added: 46306
2018-02-08 11:55 DenisChenu Note Added: 46314
2018-02-08 14:17 DenisChenu Assigned To => DenisChenu
2018-02-08 14:17 DenisChenu Status new => assigned
2018-02-08 17:14 DenisChenu Note Added: 46331
2018-02-16 16:10 user70560 Changeset attached => LimeSurvey develop a4ad7877
2018-02-16 16:10 user70560 Note Added: 46559
2018-02-16 16:10 user70560 Assigned To DenisChenu => user70560
2018-02-16 16:10 user70560 Resolution open => fixed
2018-02-16 17:54 DenisChenu Assigned To user70560 => DenisChenu
2018-02-16 17:54 DenisChenu Status assigned => resolved
2018-02-16 17:54 DenisChenu Fixed in Version => 3.3.x
2018-02-16 17:54 DenisChenu Note Added: 46564
2018-02-21 16:46 c_schmitz Note Added: 46701
2018-02-21 16:46 c_schmitz Status resolved => closed
2018-02-21 16:49 DenisChenu Note Added: 46705
2018-09-11 15:48 DenisChenu Relationship added related to 14047