View Issue Details

IDProjectCategoryView StatusLast Update
15839Bug reportsSurvey editingpublic2020-03-20 17:04
Reporterbismark Assigned Toollehar  
PrioritynoneSeveritypartial_block 
Status feedbackResolutionopen 
Product Version3.22.2 
Summary15839: when moving questions to another group, gids of subquestions dont change
Description

see images

TagsNo tags attached.
Complete LimeSurvey version number (& build)3.xLTS
I will donate to the project if issue is resolvedNo
Browser
Database & DB-Version10.1.26-MariaDB
Server OS (if known)
Webserver software & version (if known)
PHP Version7.1.8

Relationships

duplicate of 15229 closedmarkusfluer Subquestions do not have GID changed once the parent question is moved 

Activities

bismark

bismark

2020-02-10 12:01

reporter  

parent-question.PNG (9,806 bytes)   
parent-question.PNG (9,806 bytes)   
subquestions.PNG (9,908 bytes)   
subquestions.PNG (9,908 bytes)   
bismark

bismark

2020-02-10 12:12

reporter   ~55820

seems to be the same issue: https://bugs.limesurvey.org/view.php?id=15229

bismark

bismark

2020-02-10 12:22

reporter   ~55821

ok, after executing the data integrity check, the gids have changed correctly

Mazi

Mazi

2020-02-10 12:24

partner   ~55822

@cdorin, feel free to close this one.

bismark

bismark

2020-02-10 12:54

reporter   ~55828

no, the gids of subquestions have to change the same time when the parent question gid has changed
so it is still an error

ollehar

ollehar

2020-02-10 14:09

administrator   ~55830

PLEASE write a proper how-to-reproduce!

bismark

bismark

2020-02-10 15:51

reporter   ~55837

  1. create a survey
  2. create 2 question groups (pages) A and B
  3. create a matrix question X in group A (or any other question type with subquestions)
  4. create subquestions
  5. create answers
  6. move question X to group B

results:

  • gid of question changes to gid of B (ok)
  • gids of subquestions change to gid of B (fails)
bismark

bismark

2020-02-12 09:12

reporter   ~55880

... to change this code?

application/controllers/admin/questiongroups.php => updateOrder

ollehar

ollehar

2020-02-12 11:26

administrator   ~55884

Thank you @bismark, will test later!

ollehar

ollehar

2020-02-12 11:27

administrator   ~55885

Question: Does gid for subquestions matter? They should be fetched through parent_qid, not gid.

bismark

bismark

2020-02-12 11:41

reporter   ~55888

I need gid for subquestions to build proper column names (123456X12X13...)

ollehar

ollehar

2020-02-12 11:46

administrator   ~55891

Good point.

ollehar

ollehar

2020-03-20 16:44

administrator   ~56715

Tested on latest LS4, this seems to work. Will try LS3-LTS too.

Relevant line: https://github.com/LimeSurvey/LimeSurvey/blob/master/application/controllers/admin/questiongroups.php#L714-L715

ollehar

ollehar

2020-03-20 17:02

administrator   ~56717

In LS3 it was already fixed here: https://bugs.limesurvey.org/view.php?id=15229

ollehar

ollehar

2020-03-20 17:04

administrator   ~56718

Cannot reproduce. Please try again with latest version of LS3 or LS4.

Issue History

Date Modified Username Field Change
2020-02-10 12:01 bismark New Issue
2020-02-10 12:01 bismark File Added: parent-question.PNG
2020-02-10 12:01 bismark File Added: subquestions.PNG
2020-02-10 12:12 bismark Note Added: 55820
2020-02-10 12:22 bismark Note Added: 55821
2020-02-10 12:24 Mazi Relationship added duplicate of 15229
2020-02-10 12:24 Mazi Note Added: 55822
2020-02-10 12:54 bismark Note Added: 55828
2020-02-10 14:09 ollehar Note Added: 55830
2020-02-10 14:09 ollehar Status new => feedback
2020-02-10 15:51 bismark Note Added: 55837
2020-02-10 15:51 bismark Status feedback => new
2020-02-12 09:12 bismark Note Added: 55880
2020-02-12 11:26 ollehar Note Added: 55884
2020-02-12 11:27 ollehar Note Added: 55885
2020-02-12 11:41 bismark Note Added: 55888
2020-02-12 11:46 ollehar Note Added: 55891
2020-03-20 16:44 ollehar Note Added: 56715
2020-03-20 17:02 ollehar Note Added: 56717
2020-03-20 17:04 ollehar Assigned To => ollehar
2020-03-20 17:04 ollehar Status new => feedback
2020-03-20 17:04 ollehar Note Added: 56718