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).
 10
IDProjectCategoryView StatusLast Update
16453Bug reportsQuestion editorpublic2020-07-21 09:38
Reportergabrieljenik Assigned To 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version4.2.7 
Summary16453: Sometimes we get duplicate question_orders on new questions
DescriptionAfter creating a new question on a group with previous questions, the question_order attribute is duplicated with other questions.
TagsNo tags attached.
Bug heat10
Complete LimeSurvey version number (& build)4.2.7
I will donate to the project if issue is resolvedNo
Browser
Database & DB-VersionMysql
Server OS (if known)
Webserver software & version (if known)
PHP Version7

Relationships

related to 16334 feedback Condition editor: previous question not available 

Activities

gabrieljenik

gabrieljenik

2020-07-02 18:01

manager   ~58659

This could happen on v3 as code is shared.
DenisChenu

DenisChenu

2020-07-02 18:17

developer   ~58665

Last edited: 2020-07-15 16:01

I never see question_order issue in 3, but a lot in 4.

Unsure it's related to preview ? Link to code ?
gabrieljenik

gabrieljenik

2020-07-07 16:07

manager   ~58751

Last edited: 2020-07-15 16:01

The QuestionEditorController was assigning the order to new questions based on getMaxQuestionOrder(), without increasing by one, so new questions had the same order as the last one on the group.

https://github.com/LimeSurvey/LimeSurvey/blob/master/application/controllers/QuestionEditorController.php#L868
gabrieljenik

gabrieljenik

2020-07-10 19:51

manager   ~58903

Last edited: 2020-07-15 16:01

PR: https://github.com/LimeSurvey/LimeSurvey/pull/1481

user225042

2020-07-13 18:12

  ~58930

Last edited: 2020-07-15 16:01

Tested the issue by pulling the PR. Working as expected. Please refer the attachment for more details
16453_QuestionOrder.png (105,234 bytes)
guest

guest

2020-07-15 15:56

viewer   ~58959

Last edited: 2020-07-15 16:01

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

lime_release_bot

2020-07-21 09:38

administrator   ~59012

Fixed in Release 4.3.5+200721

Related Changesets

LimeSurvey: master 8217e548

2020-07-15 15:56:32

gabrieljenik


Committer: GitHub Details Diff
Fixed issue 16453: Sometimes we get duplicate question_orders on new questions (#1481)

Dev: The QuestionEditorController was assigning the order to new questions based on getMaxQuestionOrder(), without
Dev: increasing by one, so new questions had the same order as the last one on the group
Affected Issues
16453
mod - application/controllers/QuestionEditorController.php Diff File

Issue History

Date Modified Username Field Change
2020-07-02 17:49 gabrieljenik New Issue
2020-07-02 17:50 gabrieljenik Relationship added related to 16334
2020-07-02 18:01 gabrieljenik Note Added: 58659
2020-07-02 18:17 DenisChenu Note Added: 58665
2020-07-03 11:05 ollehar Product Version => 4.2.7
2020-07-06 11:42 cdorin Priority none => normal
2020-07-06 11:42 cdorin Status new => confirmed
2020-07-06 11:42 cdorin Zoho Sprints => |Yes|
2020-07-06 13:48 swendrich Zoho Sprints ID => 14469000000167025
2020-07-07 16:07 gabrieljenik Note Added: 58751
2020-07-10 19:51 gabrieljenik Note Added: 58903
2020-07-13 18:12 user225042 Note Added: 58930
2020-07-13 18:12 user225042 File Added: 16453_QuestionOrder.png
2020-07-15 15:56 gabrieljenik Changeset attached => LimeSurvey master 8217e548
2020-07-15 15:56 guest Note Added: 58959
2020-07-15 16:01 swendrich Zoho Sprints Yes => |Yes|
2020-07-15 16:01 swendrich Status confirmed => resolved
2020-07-21 09:38 lime_release_bot Zoho Sprints Yes => |Yes|
2020-07-21 09:38 lime_release_bot Note Added: 59012
2020-07-21 09:38 lime_release_bot Status resolved => closed
2020-07-21 09:38 lime_release_bot Resolution open => fixed