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).
 6
IDProjectCategoryView StatusLast Update
14955Bug reportsConditionspublic2022-01-05 09:37
Reportergabrieljenik Assigned ToDenisChenu  
PrioritynormalSeveritypartial_block 
Status closedResolutionfixed 
Product Version3.15.x 
Fixed in Version5.2.x 
Summary14955: Question relevance is not reassessed after group is shown
Description

Sample Survey Structure:

GA - Always shown
QA1 - Always shown
QA2 - Always shown
GB - Shown if QA2 > 1
QB1 - Shown if QA1 > 1

As how the questions are answered (ordered), GB will be shown after QA2 is answered.
QB1 is expected to be shown, but its not.

Additional Information

I have debugged and seen that its relevance is not evaluated when QA1 is answered as its group not shown at that time.
Suggestion: Revealuate questions' relevance when its parent group is shown.

TagsNo tags attached.
Attached Files
Bug heat6
Complete LimeSurvey version number (& build)Version 3.15.9+190214
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMysql
Server OS (if known)
Webserver software & version (if known)
PHP Version7

Relationships

related to 14467 acknowledged EM : relevance not being recalculated after conditions updated if question are shown before 
related to 14465 closedDenisChenu EM relevance not being recalculated after conditions changed (Full survey included) 

Activities

DenisChenu

DenisChenu

2019-05-30 14:16

developer   ~52250

I think it's already resolved in 3.17 : Please send a sample lss

https://github.com/LimeSurvey/LimeSurvey/blob/c058ddae78ef5c4ae95e9531a1aa8a9aaa7a2265/docs/release_notes.txt#L294
https://github.com/LimeSurvey/LimeSurvey/commit/24b57b56847d205fd42d3171a1955420a1576979

gabrieljenik

gabrieljenik

2019-06-02 15:26

manager   ~52264

Last edited: 2021-12-22 16:05

Please find attached sample.
Retested with Version 3.17.4+190529

I saw the github change.
I believe the relevance of child questions should be reevaluated when its group is shown (relevance: on).
At least, i believve that's the issue here.

Thanks!

DenisChenu

DenisChenu

2019-06-02 17:41

developer   ~52265

Last edited: 2021-12-22 16:05

Yes, confirm the issue … it's not the same but is near https://bugs.limesurvey.org/view.php?id=14467 … meaning : order of expression have an importance .

I mean : the function to hide/show Question happen before the function hide/show group …

Can be fixed adding group relevance to question .

Or to check all condition when group appear …

There are surely othis issue with such things like that:

G2Q1 : Show G2Q2 (Yes/No) Default value to Y
G2Q2 : relevance set to G2Q1 == "Y" (must be shown by default)

DenisChenu

DenisChenu

2019-06-02 17:47

developer   ~52266

Last edited: 2021-12-22 16:05

PS : seems there are a «start point of checking for All in one survey» here : https://github.com/LimeSurvey/LimeSurvey/blob/5ff4910ea13e97a057bd6ab784b1ab1902ffe622/application/helpers/expressions/em_manager_helper.php#L7824-L7826

But like the other : only for equation …

DenisChenu

DenisChenu

2019-06-02 17:51

developer   ~52267

Last edited: 2021-12-22 16:05

Ou … better solution :

When checking of question must be shown : current JS test relevanceOfQuestion && relevanceOfGroup BUT : it muts test only relevanceOfQuestion because we can show question inside a hidden group

But : it seems to be …

if ((LEMval('showQuestion.NAOK')  == 'Y'))
{
  $('#question10967').trigger('relevance:on');
  relChange10967=true;
  $('#relevance10967').val('1');
}
else {
  $('#question10967').trigger('relevance:off');
  if ($('#relevance10967').val()=='1') { relChange10967=true; }
  $('#relevance10967').val('0');
}
gabrieljenik

gabrieljenik

2019-06-03 21:00

manager   ~52282

Last edited: 2021-12-22 16:05

Not sure if I should reply something.
I think I agree with you :)

As per this line:

$('#relevance10967').val('1');

Not sure why is that set

DenisChenu

DenisChenu

2019-06-04 09:50

developer   ~52285

Last edited: 2021-12-22 16:05

#relevance10967 is used to check QCODE.relevanceStatus , if it's 0 : QCODE.NAOK send null in all condition.

In fact : checking group.relevance && question.relevance is needed if the question is used in another question …

Recheck all question relevance when a group is shown can be done BUT :
JS relevance system is linked to an update of another question : https://github.com/LimeSurvey/LimeSurvey/blob/5ff4910ea13e97a057bd6ab784b1ab1902ffe622/application/helpers/expressions/em_manager_helper.php#L7839-L7840 (sgqa)

This is needed to check if sgqa is used in this function …

Else : you get JS loop : https://bugs.limesurvey.org/view.php?id=14958

DenisChenu

DenisChenu

2021-10-26 17:50

developer   ~66944

Last edited: 2021-12-22 16:05

OK : issue in JS of expression manager : must continue if group of current question are updated.

DenisChenu

DenisChenu

2021-10-26 18:03

developer   ~66946

Last edited: 2021-12-22 16:05

best way to check

  1. launch survey
  2. Click on show question Yes
  3. Click on show group Yes
  4. Only one question shown
  5. Click on show question No
  6. Click on show question Yes
    7.two questions shown
DenisChenu

DenisChenu

2021-10-26 18:09

developer   ~66947

Last edited: 2021-12-22 16:05

3LTS : https://github.com/LimeSurvey/LimeSurvey/pull/2119
5master : https://github.com/LimeSurvey/LimeSurvey/pull/2121

DenisChenu

DenisChenu

2021-11-04 06:56

developer   ~67086

Last edited: 2021-12-22 16:05

Fix committed to 3.x-LTS branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=32858

DenisChenu

DenisChenu

2021-11-04 06:58

developer   ~67087

Last edited: 2021-12-22 16:05

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

LimeBot

LimeBot

2022-01-05 09:37

administrator   ~67925

Fixed in Release 5.2.0+211110

Related Changesets

LimeSurvey: 3.x-LTS edcf1af9

2021-11-04 06:56:06

DenisChenu


Committer: GitHub Details Diff
Fixed issue 14955: Question relevance is not reassessed after group is shown (#2119)

Dev: test of condition of question must be checked if relevance of his group was updated.
Affected Issues
14955
mod - application/helpers/expressions/em_manager_helper.php Diff File

LimeSurvey: master d864102d

2021-11-04 06:56:28

DenisChenu


Committer: GitHub Details Diff
Fixed issue 14955: Question relevance is not reassessed after group is shown (#2121)

Dev: test of condition of question must be checked if relevance of his group was updated.
Affected Issues
14955
mod - application/helpers/expressions/em_manager_helper.php Diff File

Issue History

Date Modified Username Field Change
2019-05-29 18:28 gabrieljenik New Issue
2019-05-30 14:16 DenisChenu Note Added: 52250
2019-05-30 14:16 DenisChenu Relationship added related to 14467
2019-05-30 14:16 DenisChenu Relationship added related to 14465
2019-06-02 15:26 gabrieljenik File Added: limesurvey_survey_126764.lss
2019-06-02 15:26 gabrieljenik Note Added: 52264
2019-06-02 17:41 DenisChenu Note Added: 52265
2019-06-02 17:47 DenisChenu Note Added: 52266
2019-06-02 17:51 DenisChenu Note Added: 52267
2019-06-03 21:00 gabrieljenik Note Added: 52282
2019-06-04 09:50 DenisChenu Note Added: 52285
2021-03-10 17:03 ollehar Assigned To => ollehar
2021-03-10 17:03 ollehar Status new => feedback
2021-08-31 08:51 c_schmitz Bug heat 6 => 4
2021-08-31 08:51 c_schmitz Assigned To ollehar =>
2021-08-31 08:51 c_schmitz Status feedback => confirmed
2021-09-01 15:16 galads Priority none => normal
2021-09-01 15:16 galads Sync to Zoho Project => |Yes|
2021-09-01 15:16 galads Assigned To => gabrieljenik
2021-09-01 15:16 galads Status confirmed => assigned
2021-09-01 16:14 c_schmitz Sync to Zoho Project Yes =>
2021-09-01 16:14 c_schmitz Sync to Zoho Project => |Yes|
2021-10-26 17:49 DenisChenu Assigned To gabrieljenik => DenisChenu
2021-10-26 17:50 DenisChenu Note Added: 66944
2021-10-26 18:03 DenisChenu Note Added: 66946
2021-10-26 18:09 DenisChenu Assigned To DenisChenu => galads
2021-10-26 18:09 DenisChenu Status assigned => ready for testing
2021-10-26 18:09 DenisChenu Note Added: 66947
2021-11-04 06:56 DenisChenu Changeset attached => LimeSurvey 3.x-LTS edcf1af9
2021-11-04 06:56 DenisChenu Note Added: 67086
2021-11-04 06:56 DenisChenu Assigned To galads => DenisChenu
2021-11-04 06:56 DenisChenu Resolution open => fixed
2021-11-04 06:58 DenisChenu Changeset attached => LimeSurvey master d864102d
2021-11-04 06:58 DenisChenu Note Added: 67087
2021-12-22 16:05 DenisChenu Status ready for testing => resolved
2021-12-22 16:05 DenisChenu Fixed in Version => 5.2.x
2022-01-05 09:37 LimeBot Note Added: 67925
2022-01-05 09:37 LimeBot Status resolved => closed
2022-01-05 09:37 LimeBot Bug heat 4 => 6