View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
19160 | Bug reports | Survey editing | public | 2023-10-10 04:15 | 2023-11-23 11:07 |
Reporter | mfavetti | Assigned To | kfoster | ||
Priority | high | Severity | block | ||
Status | confirmed | Resolution | reopened | ||
Product Version | 5.6.x | ||||
Summary | 19160: Unable to save subquestions | ||||
Description | In fixing the default answers being overridden when saving subquestions for 5.x and 6.x branches (18817 and 18976, respectively) a regression was introduced that prevented questions with subquestion being created. This was fixed for 6.x in 8da618d91e3406b447b09c5ee3106c2a035e06d6 (19152). However, the above fix also created a regression in 5.x that prevents questions with subquestions from being saved with a message that subquestion codes must be unique. This regression was not fixed and the issue persists. I think this will take a combination of changes from commits 8da618d91e3406b447b09c5ee3106c2a035e06d6 and d5b0bec9921e3a3c9ca764774e9440893dcb94d5 in the 6.x branch to fix the 5.x branch. In 6.x, the subquestion code validation was moved out of the model and into a separate function. This is where the fix for the regression was applied in 6.x. In 5.x the validation is still done in the model and because the subquestions are not deleted anymore before saving the new ones, the new ones fail the unique test. Recommend users stay on 5.6.39 until fixed. (I think this is worse than default answers being overridden) | ||||
Tags | No tags attached. | ||||
Bug heat | 24 | ||||
Complete LimeSurvey version number (& build) | 5.6 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | mariadb 10.6 | ||||
Server OS (if known) | |||||
Webserver software & version (if known) | |||||
PHP Version | 8.0.32 | ||||
related to | 18817 | closed | kfoster | Editing a question deletes default answers |
related to | 18976 | closed | adamzammit | Saving a question with subquestions deletes default answers |
related to | 19152 | closed | c_schmitz | ERROR 500 when creat multiple choice question or multiple short text |
related to | 19088 | closed | tibor.pacalat | Question Array(Text) codes must be unique (but they are) |
has duplicate | 19265 | closed | mfavetti | input on demand: cannot update in place subquestions unless changing subq. code |
related to | 19108 | assigned | ollehar | Error: Subquestion codes should be unique. Cannot save the subquestions even their codes are unique. |
Fix committed to 5.x branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=35612 |
|
Fixed in Release 5.6.41+231017 |
|
problem persists in 5.6.41 create survey behavior: error! subquestion codes must be unique (but they are unique) i don't know if i should open a new issue or modify this one |
|
QuestionAdministrationController.php L:2803 the new subquestion gets saved here, but the existing ones are not deleted until L:2825 the model checks if the subquestion is unique in rules Question.php L:176, so the save fails because the model says the subquestion is not unique |
|
Fix committed to 5.x branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=35630 |
|
Fix committed to 5.x branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=35631 |
|
As mentioned in chat, also test with quick add + replace. |
|
testing on 5.6.42 can change sq codes and sq text quick add/replace still errors |
|
another user reported this problem today in 19265 |
|
LimeSurvey: 5.x abcc4222 2023-10-12 17:43 K Foster Committer: GitHub Details Diff |
Fixed issue 19160 - subquestion save, scale id code (#3532) * Fixed issue 19160 - subquestion save, code can be duplicate between scales * dev: refactor QuestionAdministrationController::storeSubquestions |
Affected Issues 19160 |
|
mod - application/controllers/QuestionAdministrationController.php | Diff File | ||
LimeSurvey: 5.x 132e6f61 2023-10-17 17:39 K Foster Committer: GitHub Details Diff |
Bug/19160 v5 subquestion save (03546) * 'Fixed issue 19160 - subquestion save, code can be duplicate between scales * dev: refactor QuestionAdministrationController::storeSubquestions * Fixed issue 19160 - delete removed subquestions |
Affected Issues 19160 |
|
mod - application/controllers/QuestionAdministrationController.php | Diff File | ||
LimeSurvey: 5.x 132e6f61 2023-10-17 17:39 K Foster Committer: GitHub Details Diff |
Bug/19160 v5 subquestion save (03546) * 'Fixed issue 19160 - subquestion save, code can be duplicate between scales * dev: refactor QuestionAdministrationController::storeSubquestions * Fixed issue 19160 - delete removed subquestions |
Affected Issues 19160 |
|
mod - application/controllers/QuestionAdministrationController.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2023-10-10 04:15 | mfavetti | New Issue | |
2023-10-10 04:15 | mfavetti | Relationship added | related to 18817 |
2023-10-10 04:15 | mfavetti | Relationship added | related to 18976 |
2023-10-10 04:16 | mfavetti | Relationship added | related to 19152 |
2023-10-10 04:17 | mfavetti | Description Updated | |
2023-10-10 04:18 | mfavetti | Description Updated | |
2023-10-10 04:20 | mfavetti | Description Updated | |
2023-10-10 04:21 | mfavetti | Issue Monitored: mfavetti | |
2023-10-10 04:21 | mfavetti | Bug heat | 0 => 2 |
2023-10-10 04:23 | mfavetti | Description Updated | |
2023-10-10 04:24 | mfavetti | Description Updated | |
2023-10-10 04:24 | mfavetti | Priority | none => high |
2023-10-10 14:30 | DenisChenu | Assigned To | => kfoster |
2023-10-10 14:30 | DenisChenu | Status | new => assigned |
2023-10-10 14:31 | DenisChenu | Status | assigned => feedback |
2023-10-12 15:53 | Changeset attached | => LimeSurvey 5.x abcc4222 | |
2023-10-12 15:53 | guest | Note Added: 77677 | |
2023-10-12 15:53 | guest | Bug heat | 2 => 4 |
2023-10-16 08:55 | LimeBot | Note Added: 77726 | |
2023-10-16 08:55 | LimeBot | Status | feedback => closed |
2023-10-16 08:55 | LimeBot | Resolution | open => fixed |
2023-10-16 08:55 | LimeBot | Bug heat | 4 => 6 |
2023-10-17 09:32 | mfavetti | Note Added: 77732 | |
2023-10-17 09:32 | mfavetti | Bug heat | 6 => 8 |
2023-10-17 09:32 | mfavetti | Status | closed => confirmed |
2023-10-17 09:32 | mfavetti | Resolution | fixed => reopened |
2023-10-17 09:33 | mfavetti | Note Edited: 77732 | |
2023-10-17 09:33 | mfavetti | Note Edited: 77732 | |
2023-10-17 09:33 | mfavetti | Note Edited: 77732 | |
2023-10-17 09:34 | mfavetti | Note Edited: 77732 | |
2023-10-17 09:47 | mfavetti | Note Added: 77733 | |
2023-10-17 15:42 | Changeset attached | => LimeSurvey 5.x 132e6f61 | |
2023-10-17 15:42 | Changeset attached | => LimeSurvey 5.x 132e6f61 | |
2023-10-17 15:42 | guest | Note Added: 77744 | |
2023-10-17 15:42 | guest | Note Added: 77745 | |
2023-10-20 14:50 | ollehar | Note Added: 77808 | |
2023-10-20 14:50 | ollehar | Bug heat | 8 => 10 |
2023-10-23 20:08 | mfavetti | Relationship added | related to 19108 |
2023-10-23 20:10 | mfavetti | Relationship added | related to 19088 |
2023-10-26 21:01 | mfavetti | Note Added: 78066 | |
2023-11-22 22:47 | mfavetti | Relationship added | has duplicate 19265 |
2023-11-22 22:47 | mfavetti | Bug heat | 10 => 16 |
2023-11-22 22:49 | mfavetti | Note Added: 78658 | |
2023-11-23 10:28 | guest | Bug heat | 16 => 22 |
2023-11-23 11:07 | ritapas | Issue Monitored: ritapas | |
2023-11-23 11:07 | ritapas | Bug heat | 22 => 24 |