View Issue Details

This bug affects 1 person(s).
IDProjectCategoryView StatusLast Update
16334Bug reportsConditionspublic2021-04-16 16:20
ReporterJelle_S Assigned To 
Status feedbackResolutionreopened 
Product Version4.2.4 
Summary16334: Condition editor: previous question not available
Description.lss file attached

In this survey, when using the condition editor for question G09Q63 (in group "Algemene evaluatie"), the previous question (G06Q33) is not available to base the conditions on, not sure what the cause is.

Even weirder, in the condition editor of G06Q33 (first of the two), the next question (G09Q63) *is* available. So the condition editor seems to think the order of those two questions is reversed.
Steps To ReproduceImport the .lss file
Navigate to the condition editor of question G09Q63
Question G06Q33 is not available in the list of previous questions

Navigate to the condition editor of question G06Q33
Question G09Q63 *is* available in the list of previous questions
TagsNo tags attached.
Bug heat14
Complete LimeSurvey version number (& build)4.2.7+200604
I will donate to the project if issue is resolvedNo
Database type & versionmariadb Ver 15.1 Distrib 10.1.43-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2, DB version 426
Server OS (if known)
Webserver software & version (if known)
PHP VersionPHP 7.2.24-0ubuntu0.18.04.4


related to 16453 closed Sometimes we get duplicate question_orders on new questions 
related to 16454 closedgabrieljenik Sometimes, question_order is assigned from survey_id 

Users monitoring this issue

User List There are no users monitoring this issue.




2020-05-27 10:36




2020-06-03 13:17

reporter   ~58156

Fix committed to master branch:


2020-06-03 13:37

reporter   ~58158

@thedirtypanda That fix seems to only change labels, no logic? The commit seems unrelated


2020-06-03 16:17

developer   ~58159

Its not fixed. Currently @p_teichmann is working on this issue.It was my fault, cause I took the wrong mantis id. Just wait.


2020-06-04 12:32

administrator   ~58179

Fixed in Release 4.2.7+200604


2020-06-04 13:00

reporter   ~58180

The bot closed this because of the wrong mantis id. Re-opening


2020-06-25 15:51

manager   ~58472

Last edited: 2020-06-25 15:54

View 2 revisions

Please find below what we have seen from this bug:

## Influentiators
The following are not causes, but influentiators in the situation that makes things confusing
1 - Sometimes we get duplicate question_orders (on new questions)
2 - Sometimes, question_order is assigned from survey_id

## Cause
The cause (from our point o view):
Ordering algorithm while fetching questions for left side bar (surveyadmin.php::567 - getAjaxQuestionGroupArray) is different than the one used for fetching questions for condition manager (conditionsaction.php::1309 - getQuestionRows).
As we are dealing with duplicate question_orders, that differen derived algorithm difference derived on different ordering results.
When user sees ordering on left side bar false expectations are created in what it should be show on the condition editor.

## Our suggested solution?
- Reorder the questions as to refresh the question_order.
- Fix situations 1 and 2.
- Review this happening on v3 (code seems to be the same)

## Why not applying a fix in the order criteria?
We thought about adding QID as second order criteria, as to have that when question_order is duplicate.
Still, there are already lots of DBs already with duplicates, so doing that may change unexpectedly the order.
So, fixing the order criteria could be good on a different LS version, when people are aware that some changes may happen.


2020-07-06 11:57

administrator   ~58692

> As we are dealing with duplicate question_orders, that differen derived algorithm difference derived on different ordering results.

What does this mean? :D

Would removing the code duplication fix the issue?


2020-07-10 20:53

manager   ~58906

Last edited: 2020-07-10 20:54

View 2 revisions

> Would removing the code duplication fix the issue?

Yes. A workaround would be reordering the questions.
Then the problem would be solved.

And of course not having duplicates will avoid the issue


2021-03-19 10:03

administrator   ~63456

I think that the deciding factor is how the order is done when the survey is executed.
That way of ordering should apply everywhere.

@gabrieljenik Would that be easy to fix?


2021-03-25 17:04

manager   ~63619

Question editor is working fine now.
(There were some fixes about the order)

Still, some data may be still corrupted, as on this case.
We could add a check on the data integrity report? As for fixing, we could trigger some fix from there.
I would start by the data integrity check


2021-04-16 16:20

manager   ~63992

As data integrity check about order was already there, we just reinforce the message :)

Related Changesets

LimeSurvey: master ce2fb6db

2020-06-02 13:21:57


Details Diff
Fixed issue 16334: Group list menu under Survey menu: Titles of the page are not proper Affected Issues
mod - application/views/admin/survey/QuestionGroups/listquestiongroups.php Diff File

Issue History

Date Modified Username Field Change
2020-05-27 10:36 Jelle_S New Issue
2020-05-27 10:36 Jelle_S File Added: limesurvey_survey_447755.lss
2020-05-27 13:53 ollehar Summary Question editor: previous question not available => Condition editor: previous question not available
2020-05-27 17:13 user225042 Priority none => high
2020-05-27 17:13 user225042 Status new => confirmed
2020-05-27 17:13 user225042 Zoho Sprints => |Yes|
2020-05-27 17:13 swendrich Zoho Sprints ID => 14469000000105001
2020-06-02 12:12 JHoeck Assigned To => JHoeck
2020-06-02 12:12 JHoeck Status confirmed => assigned
2020-06-02 12:55 JHoeck Assigned To JHoeck =>
2020-06-02 12:59 cdorin Assigned To => p_teichmann
2020-06-02 12:59 cdorin Status assigned => confirmed
2020-06-02 12:59 cdorin Zoho Sprints Yes => |Yes|
2020-06-03 13:17 thedirtypanda Changeset attached => LimeSurvey master ce2fb6db
2020-06-03 13:17 thedirtypanda Note Added: 58156
2020-06-03 13:37 Jelle_S Note Added: 58158
2020-06-03 16:17 JHoeck Note Added: 58159
2020-06-04 12:32 lime_release_bot Zoho Sprints Yes => |Yes|
2020-06-04 12:32 lime_release_bot Note Added: 58179
2020-06-04 12:32 lime_release_bot Status confirmed => closed
2020-06-04 12:32 lime_release_bot Resolution open => fixed
2020-06-04 13:00 Jelle_S Status closed => feedback
2020-06-04 13:00 Jelle_S Resolution fixed => reopened
2020-06-04 13:00 Jelle_S Complete LimeSurvey version number (& build) 4.2.4+200520 => 4.2.7+200604
2020-06-04 13:00 Jelle_S Note Added: 58180
2020-06-25 15:51 gabrieljenik Note Added: 58472
2020-06-25 15:54 gabrieljenik Note Edited: 58472 View Revisions
2020-07-02 17:50 gabrieljenik Relationship added related to 16453
2020-07-02 17:59 gabrieljenik Relationship added related to 16454
2020-07-06 11:57 ollehar Note Added: 58692
2020-07-10 20:53 gabrieljenik Note Added: 58906
2020-07-10 20:54 gabrieljenik Note Edited: 58906 View Revisions
2020-12-22 16:05 cdorin Assigned To p_teichmann =>
2021-03-19 10:03 c_schmitz Note Added: 63456
2021-03-25 17:04 gabrieljenik Note Added: 63619
2021-04-16 16:20 gabrieljenik Note Added: 63992