View Issue Details

This bug affects 1 person(s).
 12
IDProjectCategoryView StatusLast Update
15816Bug reportsConditionspublic2020-02-10 12:40
ReporterJelle_S Assigned To 
PriorityhighSeveritypartial_block 
Status closedResolutionfixed 
Product Version4.1.1 
Summary15816: Conditions not evaluated correctly?
Description

i've not managed to track it down exactly, but something weird is going on when evaluating whether or not a group should be shown.

I've attached two survey structures, one with a condition on the "verblijf of niet" group, and one without. In both cases, when entering these anwsers in order:

  • 18 of > 18
  • Nederland
  • nee
  • nee

The group "verblijf of niet" should be shown. While the page is shown, the group is hidden. It seems like something goes wrong when evaluating conditions for these groups / questions in these groups.

Steps To Reproduce

import the .lss file and enter the answers above

TagsNo tags attached.
Attached Files
Bug heat12
Complete LimeSurvey version number (& build)4.1.1+200203
I will donate to the project if issue is resolvedNo
Browser
Database type & versionmariadb Ver 15.1 Distrib 10.1.43-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2, DB version 425
Server OS (if known)
Webserver software & version (if known)
PHP VersionPHP 7.2.24-0ubuntu0.18.04.2

Users monitoring this issue

Jelle_S

Activities

ollehar

ollehar

2020-02-04 16:50

administrator   ~55707

Is the same survey working fine in LS3?

ollehar

ollehar

2020-02-04 17:23

administrator   ~55713

Another weird thing is the "empty" question in the failing group. See screenshot.

Selection_992.png (53,205 bytes)   
Selection_992.png (53,205 bytes)   
ollehar

ollehar

2020-02-04 17:27

administrator   ~55714

No, nevermind, that bug is in every group.

ollehar

ollehar

2020-02-04 17:39

administrator   ~55715

Hm, since the survey was created in LS4, it cannot be imported in LS3.

Jelle_S

Jelle_S

2020-02-04 21:32

reporter   ~55722

I haven't tested it myself, but fwiw the user that created the survey reported it was working fine before the upgrade. I don't have that LS3 instance anymore. I might be able to dig up a database backup from before the update and see what I can test.

DenisChenu

DenisChenu

2020-02-05 07:54

developer   ~55724

@ollehar : maybe try to export as txt/tsv ?
And check if you have the issue in 4.X with the TSV ?

Then : we can check if it's a logic issue …

Jelle_S

Jelle_S

2020-02-06 11:05

reporter   ~55787

Unfortunately I don't have a backup anymore of the LS3 db, so I can't provide the LS3 export

Jelle_S

Jelle_S

2020-02-07 13:07

reporter   ~55803

I did some digging, and it seems to me that the bug is located here:
https://github.com/LimeSurvey/LimeSurvey/blob/4.1.0+200128/application/helpers/frontend_helper.php#L1597

Changing

$result = QuestionGroup::model()->findAllByAttributes(['sid'=>$surveyid]);

to

$result = QuestionGroup::model()->findAllByAttributes(['sid'=>$surveyid], ['order' => 'group_order ASC']);

Seems to fix it for me. I don't know what kind of repercussions this might have, so it needs to be verified, but it at least seems to fix this particular issue. Could you guys please confirm? :)

Jelle_S

Jelle_S

2020-02-07 13:27

reporter   ~55805

I went ahead and created a PR.

DenisChenu

DenisChenu

2020-02-07 18:29

developer   ~55811

Thanks : +1 for your PR :)

guest

guest

2020-02-10 10:17

viewer   ~55817

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

lime_release_bot

lime_release_bot

2020-02-10 12:40

administrator   ~55827

Fixed in Release 4.1.2+200210

Related Changesets

LimeSurvey: master c212345d

2020-02-10 10:17:24

Jelle_S


Committer: GitHub Details Diff
Fixed issue 15816: Order groups when loading them in UpdateGroupList. (#1385) Affected Issues
15816
mod - application/helpers/frontend_helper.php Diff File

Issue History

Date Modified Username Field Change
2020-02-04 14:26 Jelle_S New Issue
2020-02-04 14:26 Jelle_S File Added: limesurvey_survey_926755.lss
2020-02-04 14:26 Jelle_S File Added: limesurvey_survey_926755_no_conditions.lss
2020-02-04 14:55 Jelle_S Issue Monitored: Jelle_S
2020-02-04 16:50 ollehar Note Added: 55707
2020-02-04 17:23 ollehar File Added: Selection_992.png
2020-02-04 17:23 ollehar Note Added: 55713
2020-02-04 17:27 ollehar Note Added: 55714
2020-02-04 17:39 ollehar Note Added: 55715
2020-02-04 17:41 ollehar Priority none => high
2020-02-04 17:41 ollehar Status new => confirmed
2020-02-04 21:32 Jelle_S Note Added: 55722
2020-02-05 07:54 DenisChenu Note Added: 55724
2020-02-05 08:50 cdorin Assigned To => cdorin
2020-02-05 08:50 cdorin Status confirmed => assigned
2020-02-05 10:57 cdorin Assigned To cdorin =>
2020-02-06 11:05 Jelle_S Note Added: 55787
2020-02-07 13:07 Jelle_S Note Added: 55803
2020-02-07 13:27 Jelle_S Note Added: 55805
2020-02-07 18:29 DenisChenu Note Added: 55811
2020-02-10 10:17 Jelle_S Changeset attached => LimeSurvey master c212345d
2020-02-10 10:17 guest Note Added: 55817
2020-02-10 12:40 lime_release_bot Note Added: 55827
2020-02-10 12:40 lime_release_bot Status assigned => closed
2020-02-10 12:40 lime_release_bot Resolution open => fixed
2021-08-02 22:25 guest Bug heat 10 => 12