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).
 8
IDProjectCategoryView StatusLast Update
15348Bug reportsExpression Managerpublic2019-10-08 10:32
Reporterollehar Assigned Toollehar  
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version3.18.0 
Target Version3.18.x 
Summary15348: Ranking question does not save answers when array filter and max columns are used
Description

Title.

Steps To Reproduce
  1. Import survey
  2. Activate
  3. Execute
  4. Choose three options in first question
  5. Rank one question in second question
  6. BUG: Mandatory not activated
  7. BUG: Question not saved
TagsNo tags attached.
Attached Files
Bug heat8
Complete LimeSurvey version number (& build)latest master
I will donate to the project if issue is resolvedNo
Browser-
Database type & version-
Server OS (if known)-
Webserver software & version (if known)-
PHP Version-

Relationships

related to 09464 closedDenisChenu Ranking question cannot go to next question if it's filtered by another question 
parent of 15369 closedDenisChenu Ranking with filter didn't save all value 
related to 15368 closedDenisChenu Filtered ranking didn't appear if in same page than the filter 

Activities

ollehar

ollehar

2019-10-01 16:13

administrator   ~53801

@DenisChenu Did you see this before? Old issue?

DenisChenu

DenisChenu

2019-10-01 16:23

developer   ~53802

I think it work on 2.6, didn't use a lot array filter in ranking.

There are an old issue about array filter in ranking + mandatory
https://github.com/LimeSurvey/LimeSurvey/blob/0e1849256f040a4a00ed2afbc06b726f28240057/application/helpers/expressions/em_manager_helper.php#L6630

DenisChenu

DenisChenu

2019-10-01 16:25

developer   ~53803

@ollehar : checked with skelvanilla (no ajax mode) seems OK

ollehar

ollehar

2019-10-01 16:32

administrator   ~53804

@DenisChenu Skelvanilla in 2.06? Or 2.73?

DenisChenu

DenisChenu

2019-10-01 16:33

developer   ~53805

Last edited: 2019-10-01 16:34

3.18. Checked with vanilla in 3.18 (no ajax) : seems OK too

[edit] 3.28 is not out … 3.18 is …

DenisChenu

DenisChenu

2019-10-01 16:42

developer   ~53806

3.18 (0e1849256f) + vanilla + ajax mode ON : can not reproduce

jelo

jelo

2019-10-01 16:55

partner   ~53807

Not able to reproduce under Version 3.18.0 and 3.17.
Sideremark: "Please select from 1 to 7 answers." when having filtered items is a bit confusing.

ollehar

ollehar

2019-10-01 17:10

administrator   ~53808

Thanks for testing, jelo. I can't reproduce wither when starting from clean install. >< Have to check more.

ollehar

ollehar

2019-10-02 14:34

administrator   ~53825

How to reproduce:

  1. Import survey lss
  2. Make sure mandatory is OFF for ranking question
  3. Activate survey
  4. Change mandatory to ON for ranking question
  5. Execute
  6. Response is not recorded for ranking question

The combination of array filter in ranking + min/max and mandatory bugs out.

DenisChenu

DenisChenu

2019-10-02 14:41

developer   ~53826

4b : unlog , quit browser (etc …) => reset $_SESSION ?

ollehar

ollehar

2019-10-02 14:53

administrator   ~53829

The database structure in answer table is different if the survey is activated with mandatory on or off for ranking question.

Mandatory on: Nr of columns = max nr
Mandatory off: Nr of columns = nr of answer options

Don't know if that's causing the bug.

ollehar

ollehar

2019-10-02 14:53

administrator   ~53830

Will try again with clean install.

DenisChenu

DenisChenu

2019-10-02 14:56

developer   ~53832

Max number of columns is set to 7 when import LSS
If i remind (i add this restriction), when activate : max_number_columns (if empty when activate) => numbers of answer (when activate)

But your lss have already 7 in max_numbers_columns …

ollehar

ollehar

2019-10-02 15:03

administrator   ~53836

Yes, seems like the issue is resolved if you remove " Maximum columns for answers" before activating the survey.

ollehar

ollehar

2019-10-02 15:08

administrator   ~53838

Indeed, mandatory does not matter. It's the "Maximum columns for answers" attribute that causes responses not to be recorded (probably in combination with array filter).

jelo

jelo

2019-10-02 15:12

partner   ~53839

@ollehar: Are you still using the LSS you attached here? Or did you change something and now testing with a different survey structure?

DenisChenu

DenisChenu

2019-10-02 15:18

developer   ~53840

@ollehar : and what it's the value of this number ? Did you have the 7 columns like me and the seven columns in DB ?

ollehar

ollehar

2019-10-02 15:26

administrator   ~53842

I will update my latest test survey, one sec...

ollehar

ollehar

2019-10-02 15:38

administrator   ~53843

New test survey:

  1. Import
  2. Activate
  3. Execute
  4. Choose 3 answers in first question
  5. Rank any number of answers in second question
  6. Submit
  7. Check responses - ranking not recorded
DenisChenu

DenisChenu

2019-10-02 15:55

developer   ~53844

Confirm …
Issue not related to javascript,
Launch
Deactivate JS
check 3 first question,
move next ,
fill 1st dropdown with 1st answer
Next
Not saved …

ollehar

ollehar

2019-10-02 16:21

administrator   ~53849

No, it's related to your 2015 fix where the ranking subquestions get marked as irrelevant. Will read it in detail.

DenisChenu

DenisChenu

2019-10-02 16:35

developer   ~53851

Stranhe, since it was here since 3 years … and working at this time …
you find the another issue about max_subquestion_coilumn (max_db_answers (don't remind))

DenisChenu

DenisChenu

2019-10-02 16:38

developer   ~53852

Arg … confirm it's broken too in 2.6lts …

ollehar

ollehar

2019-10-02 16:38

administrator   ~53853

Maybe it broke when "Maximum columns for answers" was introduced?

ollehar

ollehar

2019-10-02 16:41

administrator   ~53854

Arg … confirm it's broken too in 2.6lts …

OK, thanks for testing!

DenisChenu

DenisChenu

2019-10-02 16:48

developer   ~53855

Maybe … but still totally unsure …

Remind : the issue with Filter for answer : We must check only count here … maybe count(notFilteredQuestion) == 0 when control ?

ollehar

ollehar

2019-10-02 16:50

administrator   ~53856

Will have to read the code more, don't understand right now.

Another theory: _ProcessSubQRelevance returns wrong result for array filter ranking subquestions.

DenisChenu

DenisChenu

2019-10-02 17:02

developer   ~53857

Subquestion in ranking are _1, _2, _3 etc …
But filter in ranking must be applied ONLY to answer …

Look at the question logic file …

RankingBroken.png (174,995 bytes)
RankingFixed.png (86,523 bytes)   
RankingFixed.png (86,523 bytes)   
ollehar

ollehar

2019-10-04 16:31

administrator   ~53894

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

ollehar

ollehar

2019-10-07 16:35

administrator   ~53927

Functional test added.

DenisChenu

DenisChenu

2019-10-07 18:27

developer   ~53932

Fixed now : right ?

lime_release_bot

lime_release_bot

2019-10-08 10:32

administrator   ~53938

Fixed in Release 3.19.0+191008

Related Changesets

LimeSurvey: master c4309bd9

2019-10-04 14:32:36

ollehar

Details Diff
Fixed issue 15348: Ranking question does not save answers when array
filter and max columns are used

Dev: As suggested by Denis on github
Affected Issues
15348
mod - application/helpers/expressions/em_manager_helper.php Diff File

Issue History

Date Modified Username Field Change
2019-10-01 16:13 ollehar New Issue
2019-10-01 16:13 ollehar File Added: limesurvey_survey_157447_ranking_array_filter.lss
2019-10-01 16:13 ollehar Note Added: 53801
2019-10-01 16:15 ollehar Assigned To => ollehar
2019-10-01 16:15 ollehar Status new => assigned
2019-10-01 16:23 DenisChenu Note Added: 53802
2019-10-01 16:25 DenisChenu File Added: Capture d’écran du 2019-10-01 16-25-25.png
2019-10-01 16:25 DenisChenu Note Added: 53803
2019-10-01 16:32 ollehar Note Added: 53804
2019-10-01 16:33 DenisChenu Note Added: 53805
2019-10-01 16:34 DenisChenu Note Edited: 53805
2019-10-01 16:42 DenisChenu Note Added: 53806
2019-10-01 16:55 jelo Note Added: 53807
2019-10-01 17:10 ollehar Note Added: 53808
2019-10-02 14:34 ollehar Note Added: 53825
2019-10-02 14:41 DenisChenu Note Added: 53826
2019-10-02 14:53 ollehar Note Added: 53829
2019-10-02 14:53 ollehar Note Added: 53830
2019-10-02 14:56 DenisChenu Note Added: 53832
2019-10-02 15:03 ollehar Note Added: 53836
2019-10-02 15:08 ollehar Note Added: 53838
2019-10-02 15:12 jelo Note Added: 53839
2019-10-02 15:18 DenisChenu Note Added: 53840
2019-10-02 15:26 ollehar Note Added: 53842
2019-10-02 15:38 ollehar File Added: limesurvey_survey_157447_array_filter_ranking_max_columns.lss
2019-10-02 15:38 ollehar Note Added: 53843
2019-10-02 15:55 DenisChenu Note Added: 53844
2019-10-02 16:21 ollehar Note Added: 53849
2019-10-02 16:23 ollehar Relationship added related to 09464
2019-10-02 16:35 DenisChenu Note Added: 53851
2019-10-02 16:38 DenisChenu Note Added: 53852
2019-10-02 16:38 ollehar Note Added: 53853
2019-10-02 16:41 ollehar Note Added: 53854
2019-10-02 16:48 DenisChenu Note Added: 53855
2019-10-02 16:50 ollehar Note Added: 53856
2019-10-02 17:02 DenisChenu File Added: RankingBroken.png
2019-10-02 17:02 DenisChenu File Added: RankingFixed.png
2019-10-02 17:02 DenisChenu Note Added: 53857
2019-10-02 18:53 ollehar Summary Ranking question does not save answers when array filter is used => Ranking question does not save answers when array filter and max columns are used
2019-10-02 18:53 ollehar File Deleted: limesurvey_survey_157447_ranking_array_filter.lss
2019-10-04 16:31 ollehar Changeset attached => LimeSurvey master c4309bd9
2019-10-04 16:31 ollehar Note Added: 53894
2019-10-04 16:31 ollehar Resolution open => fixed
2019-10-04 17:36 DenisChenu Relationship added parent of 15369
2019-10-06 10:56 DenisChenu Relationship added related to 15368
2019-10-07 16:35 ollehar Note Added: 53927
2019-10-07 18:27 DenisChenu Status assigned => resolved
2019-10-07 18:27 DenisChenu Note Added: 53932
2019-10-08 10:32 lime_release_bot Note Added: 53938
2019-10-08 10:32 lime_release_bot Status resolved => closed