View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
14315Bug reportsExpression Managerpublic2019-04-30 09:11
ReporterRacheltownsend1 Assigned ToDenisChenu  
PrioritynoneSeveritypartial_block 
Status closedResolutionfixed 
Product Version3.15.x 
Fixed in Version3.15.x 
Summary14315: Expressions with array number/checkbox are not reloading properly
Description

The problem is with Questions #2, 2b, 2c and 2d in my survey. It is an Array (Numbers) with the checkbox option. This is a mandatory question with 8 sub-questions.

The next three questions (Q2b,c,d) only pop up if certain boxes are checked in Question #2.

Here's the problem I am encountering:

I filled in some of the sub-questions for Q2 and leave the others blank.
Q2 b,c and d popped up as expected.
I completed the rest of the questions on the survey then clicked submit.
As expected, I got an error message that said 'One or more mandatory questions has not been answered. You cannot proceed until these have been completed'.
I go back up to Q2, but notice that Q2b,c and d have now disappeared.
I check off the missing boxes from Q2.
Q2b and c come back up if I click the appropriate columns in Q2, and they appear to fine.
Q2c comes back up if I click the appropriate column in Q2, but it is only filtering the new sub-questions I selected the second time. All of my previous sub-questions I selected the first time are gone.

Steps To Reproduce

To duplicate error, for Q2 select:
Sanger for Breast Cancer
Pyrosequencing for Colorectal Cancer
Real-Time PCR for Gastrointestinal Cancer
NGS for Glioblastoma
leave the rest of the sub-questions blank.
Fill in whatever you want for Q2b,c,d & Q3, then hit submit.
The error message 'One or more mandatory questions...' will pop up.
Scroll back up to Q2 and you'll notice that Q2b,c,d are no longer visible.
You can get 2b and c to come back by selecting Real-time PCR or NGS for another sub-question, however I shouldn't have to this. I should be able to see my previous responses.
However, for Q2c if you select Pyrosequencing for Thyroid cancer, you'll notice that Colorectal is no longer showing up. Since Pyrosequencing is selected for both Colorectal and Thyroid now, both should be showing up as sub-questions for Q2c.

Additional Information

Refer to LimeSurvey support ticket LS-SMCR-OQMK-CKTS for original question. It also has a link to a live survey that you duplicate the error in.

The lss file for a shorter version of this survey is attached. Let me know if you need me to make this survey active.

TagsNo tags attached.
Attached Files
Bug heat6
Complete LimeSurvey version number (& build)Version 3.15.1+181017
I will donate to the project if issue is resolvedNo
BrowserFirefox
Database type & versionwhere do I find this info?
Server OS (if known)
Webserver software & version (if known)
PHP Versionwhere do I find this info?

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2018-12-04 09:56

developer   ~49871

Last edited: 2018-12-04 10:00

I don't understand this condition :
!is_empty(Q2_SQ001_SQ004.NAOK) && (Q2_SQ001_SQ004.NAOK == Q2_SQ001_SQ004)

why not use !is_empty(Q2_SQ001_SQ004.NAOK) only ? (Q2_SQ001_SQ004.NAOK == Q2_SQ001_SQ004) must bet always true (since Q2 didn't have any condition or are filtered).

If i don't make logic error : you can surely fix by
Q2b: count(Q2_SQ001_SQ004.NAOK,Q2_SQ002_SQ004.NAOK,Q2_SQ003_SQ004.NAOK…)>0
Q2c: count(Q2_SQ001_SQ005.NAOK,Q2_SQ002_SQ005.NAOK,Q2_SQ003_SQ005.NAOK…)>0

There still a error in Expression (surely related to !is_empty(Q2_SQ001_SQ004.NAOK) && (Q2_SQ001_SQ004.NAOK == Q2_SQ001_SQ004) )

Racheltownsend1

Racheltownsend1

2018-12-04 21:03

reporter   ~49885

I deleted the code '&& (Q2_SQ001_SQ004.NAOK == Q2_SQ001_SQ004.NAOK)' etc for questions 2b, c & d, but the expressions are still not reloading after I duplicate the problem. New .lss is attached with the revised code.

DenisChenu

DenisChenu

2018-12-06 09:03

developer   ~49891

No, confirmed is just confirmed. If i work on it : assigned.

If you are a limesurvey customer (support ticket), maybe on another way.

cdorin

cdorin

2018-12-06 12:01

reporter   ~49892

This is older. Good that it is reported now - needs to be solved in one of the upcoming releases

DenisChenu

DenisChenu

2018-12-06 12:15

developer   ~49893

@cdorin : you lean : same issue in 2.73 ?

cdorin

cdorin

2018-12-06 14:39

reporter   ~49894

@DenisChenu, don't remember it in 2.73. Have been used this kind of expressions in survey mode for a while - spotted it once with the launch of LS 3

DenisChenu

DenisChenu

2018-12-06 15:15

developer   ~49895

Work on last 2.X version …

DenisChenu

DenisChenu

2018-12-11 19:24

developer   ~49928

OK,

Doing some tes : seems to happen ONLY for array number with checkbox layout …

Upload a more simple survey show the scpecific issue

DenisChenu

DenisChenu

2018-12-11 20:02

developer   ~49929

https://github.com/LimeSurvey/LimeSurvey/commit/9106dfe8afb07b99f14814d3fbcf7550e2b44bb9

Racheltownsend1

Racheltownsend1

2018-12-11 20:24

reporter   ~49930

Great! Thanks for the fix.

Any way to know when the new version with this fix will be available? I need to figure out if I can wait for the new version before I activate my survey, or if I need to figure out a work around.

DenisChenu

DenisChenu

2018-12-12 08:39

developer   ~49940

Sorry, bad mantis issue, this one really fixed now.

DenisChenu

DenisChenu

2018-12-12 23:51

developer   ~49953

Quick fix (if have FTP access)
Replace
./application/views/survey/questions/answer/arrays/multiflexi/rows/cells/answer_td_checkboxes.twig
by
https://raw.githubusercontent.com/LimeSurvey/LimeSurvey/9106dfe8afb07b99f14814d3fbcf7550e2b44bb9/application/views/survey/questions/answer/arrays/multiflexi/rows/cells/answer_td_checkboxes.twig

Racheltownsend1

Racheltownsend1

2018-12-15 01:35

reporter   ~49967

Thanks for trying with the quick fix. I replaced the file, but I'm still running into the same issue. All my answers in Q2 are cleared out and Q2b, 2c and 2d disappear whenever any mandatory question on my survey is left blank and the submit button is clicked. I'll probably figure out a different way to set up this question, but wanted to report that it's still not working.

DenisChenu

DenisChenu

2018-12-15 09:46

developer   ~49968

Maybe another difference between 3.15.1 and 3.15.5 because it work on my test with you survey.

Maybe : try to deactivate ajax mode on theme option

Racheltownsend1

Racheltownsend1

2018-12-17 19:31

reporter   ~49976

Really, it's working for you? I just updated to version 3.15.5 and deactivated ajax mode and I still can't get it to work.

Just so I know we are on the same page, let me ask you this....
Keep Q2 as is in your your screenshot above
Fill in 'AAA' for all three questions in Q2d
Hit Submit
After you do that and you scroll back up to Q2 & Q2d, do you still see all the responses you entered before you hit submit, including all the check marks in Q2 and the 'AAA' for each question in Q2d?

For some reason when I do it, all my check marks in Q2 are gone and I can't even see Q2d anymore, unless I check pyro-sequencing or send out again in Q2.

If you can still see all your answers, then I'm at a loss. I'll just rework the questions in my survey and see if I can get it to work after a future update.

DenisChenu

DenisChenu

2018-12-18 10:28

developer   ~49985

I say it work with after this fix : https://github.com/LimeSurvey/LimeSurvey/commit/9106dfe8afb07b99f14814d3fbcf7550e2b44bb9

Then : have to wait 3.15.6 version

Related Changesets

LimeSurvey: master 9106dfe8

2018-12-11 20:00:09

DenisChenu

Details Diff
Fixed issue #Expressions with array number/checkbox are not reloading properly
Dev: don't know when EM js move from javaSGQA to answerSGQA
Affected Issues
14315
mod - application/helpers/expressions/em_manager_helper.php Diff File
mod - application/views/survey/questions/answer/arrays/multiflexi/rows/cells/answer_td_checkboxes.twig Diff File

Issue History

Date Modified Username Field Change
2018-12-03 22:32 Racheltownsend1 New Issue
2018-12-03 22:32 Racheltownsend1 File Added: limesurvey_survey_819152.lss
2018-12-04 09:53 DenisChenu Status new => confirmed
2018-12-04 09:56 DenisChenu Note Added: 49871
2018-12-04 10:00 DenisChenu Note Edited: 49871
2018-12-04 21:03 Racheltownsend1 File Added: limesurvey_survey_819152(1).lss
2018-12-04 21:03 Racheltownsend1 Note Added: 49885
2018-12-06 09:03 DenisChenu Note Added: 49891
2018-12-06 12:01 cdorin Note Added: 49892
2018-12-06 12:15 DenisChenu Note Added: 49893
2018-12-06 14:39 cdorin Note Added: 49894
2018-12-06 15:15 DenisChenu Note Added: 49895
2018-12-06 15:16 DenisChenu Severity minor => partial_block
2018-12-11 19:24 DenisChenu File Added: limesurvey_survey_SimpleEMBrokenArrayNumberCheckbox.lss
2018-12-11 19:24 DenisChenu Note Added: 49928
2018-12-11 19:32 DenisChenu Assigned To => DenisChenu
2018-12-11 19:32 DenisChenu Status confirmed => assigned
2018-12-11 19:59 DenisChenu Summary Expressions are not reloading after error message is received when the submit button is clicked => Expressions with array number/checkbox are not reloading properly
2018-12-11 20:02 DenisChenu Changeset attached => LimeSurvey master 9106dfe8
2018-12-11 20:02 DenisChenu Status assigned => resolved
2018-12-11 20:02 DenisChenu Resolution open => fixed
2018-12-11 20:02 DenisChenu Fixed in Version => 3.15.x
2018-12-11 20:02 DenisChenu Note Added: 49929
2018-12-11 20:24 Racheltownsend1 Note Added: 49930
2018-12-12 08:11 DenisChenu Status resolved => feedback
2018-12-12 08:11 DenisChenu Resolution fixed => reopened
2018-12-12 08:25 DenisChenu Status feedback => assigned
2018-12-12 08:39 DenisChenu Status assigned => resolved
2018-12-12 08:39 DenisChenu Resolution reopened => fixed
2018-12-12 08:39 DenisChenu Note Added: 49940
2018-12-12 23:51 DenisChenu Note Added: 49953
2018-12-15 01:35 Racheltownsend1 Note Added: 49967
2018-12-15 09:46 DenisChenu File Added: Capture d’écran du 2018-12-15 09-45-22.png
2018-12-15 09:46 DenisChenu Note Added: 49968
2018-12-17 19:31 Racheltownsend1 Note Added: 49976
2018-12-18 10:28 DenisChenu Note Added: 49985
2019-04-30 09:11 c_schmitz Status resolved => closed