View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
18146Bug reportsSurvey editingpublic2022-06-10 08:22
ReporterMazi Assigned Togabrieljenik  
PrioritynoneSeveritypartial_block 
Status feedbackResolutionopen 
Product Version5.3.x 
Summary18146: Using "other" as subquestion code at array questions leads to saving error
Description

When trying to use "other" as subquestion code at an array question I get the below error message. The error message is misleading though:
"An error happened: Could not save subquestion Array ( [title] => Array ( [0] => 'other' can not be used if the 'Other' option for this question is activated. ) )"

-> There simply is no "other" option for array questions. So to make array filter work with e.g. a multi choice question with "other" field, it would be great if we could accept "other" as subquestion code for arrays.

Steps To Reproduce

Steps to reproduce

Create an array question and use "other" as subquestion code.

Expected result

Accept "other" as valid code.

Actual result

Misleading error message is shown about the "other" free text option which das not exist for this question type.

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)5.3.13
I will donate to the project if issue is resolvedNo
BrowserChrome
Database type & versionMariaDB 10.1.48
Server OS (if known)Ubuntu 18
Webserver software & version (if known)Apache 2.0
PHP Version7.4

Users monitoring this issue

User List There are no users monitoring this issue.

Activities

Mazi

Mazi

2022-05-24 14:41

updater  

image.png (77,759 bytes)   
image.png (77,759 bytes)   
DenisChenu

DenisChenu

2022-05-24 14:56

developer   ~69998

Seems parent question still have other == 'Y'
https://github.com/LimeSurvey/LimeSurvey/blob/a529a3d1a2c553cbd2494b2ea6d801ca87478c4f/application/models/Question.php#L171

You can try to save as array before try again ?

Mazi

Mazi

2022-05-24 14:59

updater   ~69999

Hmm, we have switched this question from a single choice question into an array questions. Could this be some kind of left-over?

DenisChenu

DenisChenu

2022-05-24 15:03

developer   ~70000

Last edited: 2022-05-24 15:04

Surely a single choice with other …

But : i think other='N' must be resetted when you save
Else : we have this error in 3.X

Maybe you can check with 3.X

  1. Create a single choice Other == 'Y'
  2. Save it
  3. Update to array
  4. Add other for subquestions

Then : dev can check how it's done in 3.X

Mazi

Mazi

2022-05-24 15:07

updater   ~70001

At LS3 the error does NOT show up. I did the steps you described and could use "other" there.

image-2.png (11,518 bytes)   
image-2.png (11,518 bytes)   
DenisChenu

DenisChenu

2022-05-24 15:18

developer   ~70003

Thank you !

DenisChenu

DenisChenu

2022-05-26 19:39

developer   ~70061

Pull request : https://github.com/LimeSurvey/LimeSurvey/pull/2443

DenisChenu

DenisChenu

2022-05-30 11:54

developer   ~70097

Improved pull request : https://github.com/LimeSurvey/LimeSurvey/pull/2443

gabrieljenik

gabrieljenik

2022-06-09 23:35

manager   ~70337

Strange. I wasn't able to reproduce the issue on latest master (no patch applied).
@DenisChenu @Mazi Am I missing something?

image-3.png (37,694 bytes)   
image-3.png (37,694 bytes)   
DenisChenu

DenisChenu

2022-06-10 08:22

developer   ~70340

You must

Create a single choice Other == 'Y'
Save and close it
Update to array
Save and close it
Add other for subquestions
Save and close it

Other are not resetted if question type didn't allow other

Issue History

Date Modified Username Field Change
2022-05-24 14:41 Mazi New Issue
2022-05-24 14:41 Mazi File Added: image.png
2022-05-24 14:56 DenisChenu Note Added: 69998
2022-05-24 14:56 DenisChenu Bug heat 0 => 2
2022-05-24 14:59 Mazi Note Added: 69999
2022-05-24 14:59 Mazi Bug heat 2 => 4
2022-05-24 15:03 DenisChenu Note Added: 70000
2022-05-24 15:04 DenisChenu Note Edited: 70000
2022-05-24 15:07 Mazi Note Added: 70001
2022-05-24 15:07 Mazi File Added: image-2.png
2022-05-24 15:18 DenisChenu Note Added: 70003
2022-05-24 15:18 DenisChenu Assigned To => DenisChenu
2022-05-24 15:18 DenisChenu Status new => assigned
2022-05-26 19:39 DenisChenu Note Added: 70061
2022-05-26 19:39 DenisChenu Assigned To DenisChenu =>
2022-05-26 19:39 DenisChenu Status assigned => ready for testing
2022-05-30 11:54 DenisChenu Note Added: 70097
2022-06-03 22:57 gabrieljenik Assigned To => gabrieljenik
2022-06-03 22:57 gabrieljenik Status ready for testing => in testing
2022-06-09 23:35 gabrieljenik Note Added: 70337
2022-06-09 23:35 gabrieljenik File Added: image-3.png
2022-06-09 23:35 gabrieljenik Bug heat 4 => 6
2022-06-09 23:35 gabrieljenik Status in testing => feedback
2022-06-10 08:22 DenisChenu Note Added: 70340
2022-06-10 08:22 DenisChenu File Added: Capture d’écran du 2022-06-10 08-20-58.png