View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
19433Bug reportsUsability/user experiencepublic2024-02-23 11:52
Reporterc_schmitz Assigned To 
PrioritynoneSeverityminor 
Status newResolutionopen 
Summary19433: Integrity check should fix automatically question/subquestion/answeroption/groups with invalid question order
Description

When running the integrity check and you have very old surveys in your database it asks you to fix order manually.
(in the very long past he question/subquestion/answer optioncodes were determined to set order).

This fix should happen automatically if you run the check.
It should inform the user which quwstion order, subquestion order, or answer option order was fixed, so the user can check if they want.

Asking the user to go to each element and fix it manually is annoying and cumbersome.

Steps To Reproduce

Steps to reproduce

Run integrity check while have a survey that has no proper question order, subquestion order or answer option order.

Expected result

Problems are fixed and I get information what was fixed with a link to check.

Actual result

I get a list of things I need to check manually with a link and have to open each link to fix it.

TagsNo tags attached.
Bug heat8
Complete LimeSurvey version number (& build)5.4.x
I will donate to the project if issue is resolvedNo
Browser
Database type & versionn/a
Server OS (if known)
Webserver software & version (if known)
PHP Versionn/a

Users monitoring this issue

mfavetti

Activities

c_schmitz

c_schmitz

2024-02-19 14:12

administrator   ~79539

Last edited: 2024-02-19 14:12

Example screenshot of current behaviour

DenisChenu

DenisChenu

2024-02-19 14:31

developer   ~79540

Asking the user to go to each element and fix it manually is annoying and cumbersome.

And sometimes : it can be done (activated surveys)

mfavetti

mfavetti

2024-02-23 10:06

developer   ~79595

@c_schmitz
for questions that trigger this error, what should the order be set to? sorted desc by title? e.g. SQ001 = 1, SQ002 = 2, SQ003 = 3, etc? by question id? what about for groups that trigger this error?

c_schmitz

c_schmitz

2024-02-23 10:11

administrator   ~79597

@mfavetti Yes, by title would be the order that would imho make most sense, because that is the way it is currently presented when you run the survey and the order is not clear. For groups, that is a good question.

DenisChenu

DenisChenu

2024-02-23 10:13

developer   ~79598

It can be because the order are badly set : same for 2 or some lack inside

Q01 : order : 0
Q02: order : 0
Q03 : order 10

Then : reorder by
Order
Question title
(in my opinion)

For group : gid because it was set by order of time set. No ?

c_schmitz

c_schmitz

2024-02-23 10:20

administrator   ~79599

Denis, I agree to your first statement regarding question order.

For groups you should pull the way the database gives it to you with the normal order by sortorder, then re-numerate like that, because that is also the way it is presented on survey taking.

DenisChenu

DenisChenu

2024-02-23 10:26

developer   ~79600

For groups you should pull the way the database gives it to you with the normal order by sortorder, then re-numerate like that, because that is also the way it is presented on survey taking.

+1 : then findAll(['condition" => "sid = :sid",'order" => 'group_order ASC') and save it like it was find

But maybe (then) same for Question
Get All the question/subquestion with "Order by question_order" and save it ?

c_schmitz

c_schmitz

2024-02-23 11:52

administrator   ~79608

As said for question by :

Sort Order as primary, then Question code as secondary in the query.

Question groups don't have codes, so we cannot do the same there.

Issue History

Date Modified Username Field Change
2024-02-19 14:10 c_schmitz New Issue
2024-02-19 14:11 c_schmitz Description Updated
2024-02-19 14:12 c_schmitz Note Added: 79539
2024-02-19 14:12 c_schmitz File Added: Screenshot 2024-02-19 at 14-03-13 LimeSurvey Cloud.png
2024-02-19 14:12 c_schmitz Bug heat 0 => 2
2024-02-19 14:12 c_schmitz Note Edited: 79539
2024-02-19 14:31 DenisChenu Note Added: 79540
2024-02-19 14:31 DenisChenu Bug heat 2 => 4
2024-02-23 10:06 mfavetti Note Added: 79595
2024-02-23 10:06 mfavetti Bug heat 4 => 6
2024-02-23 10:08 mfavetti Issue Monitored: mfavetti
2024-02-23 10:08 mfavetti Bug heat 6 => 8
2024-02-23 10:11 c_schmitz Note Added: 79597
2024-02-23 10:13 DenisChenu Note Added: 79598
2024-02-23 10:20 c_schmitz Note Added: 79599
2024-02-23 10:26 DenisChenu Note Added: 79600
2024-02-23 11:52 c_schmitz Note Added: 79608