View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
17647 | Bug reports | Statistics | public | 2021-10-04 02:34 | 2022-02-22 22:40 |
Reporter | steffen.moser | Assigned To | DenisChenu | ||
Priority | none | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 5.x | ||||
Summary | 17647: Strange sort order of question groups in simple statistics | ||||
Description | The order of the question groups in the statistics feature isn’t the same as the survey question group order itself. This happens only in one survey. Other surveys do not show this behavior. We do not know why this survey is affected. Maybe it is related to the number of questions in a question group. | ||||
Steps To Reproduce | Steps to reproduceOpen an affected survey. We do not know how to reproduce. Maybe it depends on the order of records in the database or on the relation of the number of questions in the question groups. Expected resultThe question groups in the statistics feature should be in the order of the question groups. Actual resultThe question groups are in a different order. Guess:The helper function "groupOrderThenQuestionOrder($a, $b)" defined in "application/helpers/common_helper.php" has an "if" clause which is never entered [1], so the sorting algorithm in [2] does not order by question group as the first criteria. It happens due to the fact that the array attribute "group_order" is neither in $a nor in $b (which are $rows). In contrast to the attribute "question_order", the attribute "group_order" is in a subarray called "$group". Therefore, the function should be as follows:
When patching the function as mentioned above, the problem is gone. The problem looks the same as the one mentioned in [3]. [1] https://github.com/LimeSurvey/LimeSurvey/blob/master/application/helpers/common_helper.php#L847-L848 | ||||
Tags | No tags attached. | ||||
Bug heat | 18 | ||||
Complete LimeSurvey version number (& build) | LimeSurvey Community Edition Version 5.1.14+210927 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | Firefox 92.0.1, 64-Bit, Linux (but happens with Chrome on macOS in the same way) | ||||
Database type & version | MySQL 5.7.34 | ||||
Server OS (if known) | Oracle Solaris 11.4 SRU 37 | ||||
Webserver software & version (if known) | Apache 2.4.48 | ||||
PHP Version | PHP 7.4.15 | ||||
parent of | 17777 | closed | DenisChenu | PGSQL CDbCommand issue ins statistics |
Can you open a pull request with this change, please? |
|
My opinion : we must request by good order by default : https://github.com/LimeSurvey/LimeSurvey/blob/f98ca8b9697e819449a4d7c79f224ca8ce4b2b19/application/models/Question.php#L957 My pinion : request is OK, why update order after ? For group order at 0 ? Stay must use same order tha n all other. 1st step : find way to reproduce issue (i think update order of group just before activate can be OK). |
|
@steffen.moser : can you check the order set for each group for this survey ? |
|
Issue in simple statistics With |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=32992 |
|
Hi Denis, there is a little bug, in postgres group is a reserved word, we can't use group as an table alias. /var/www/application/models/Question.php http://github.com/LimeSurvey/LimeSurvey/commit/7238a601d3c04f2619c0c42a2f4040d9fc74dcee |
|
@DarioRoig : can you
Thank you . |
|
Fixed in Release 5.2.4+211129 |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=33233 |
|
LimeSurvey: master 7238a601 2021-11-22 18:19 Committer: GitHub Details Diff |
Fixed issue 17647: Strange sort order of question groups in statistics (#2143) Dev: order is already set in request for run Dev: fix request for simple statistics Dev: check where function is used to add it in comment Dev: Some clean up on quick stat logic |
Affected Issues 17647 |
|
mod - application/controllers/admin/statistics.php | Diff File | ||
mod - application/helpers/common_helper.php | Diff File | ||
mod - application/helpers/frontend_helper.php | Diff File | ||
mod - application/models/Question.php | Diff File | ||
LimeSurvey: master 506dd2a4 2022-02-22 23:25 Steffen Moser Committer: GitHub Details Diff |
Fixed issue 17647: Strange sort order of question groups in statistics |
Affected Issues 17647 |
|
mod - application/helpers/common_helper.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-10-04 02:34 | steffen.moser | New Issue | |
2021-10-04 08:23 | galads | Assigned To | => galads |
2021-10-04 08:23 | galads | Status | new => assigned |
2021-10-04 08:24 | galads | Assigned To | galads => ollehar |
2021-10-04 08:24 | galads | Status | assigned => new |
2021-10-04 08:24 | galads | Status | new => assigned |
2021-10-04 12:18 | ollehar | Note Added: 66739 | |
2021-10-04 12:18 | ollehar | Bug heat | 0 => 2 |
2021-10-08 15:34 | ollehar | Zoho Project Synchronization | => |Yes| |
2021-11-12 10:04 | DenisChenu | Note Added: 67268 | |
2021-11-12 10:04 | DenisChenu | Bug heat | 2 => 4 |
2021-11-12 15:12 | DenisChenu | Note Added: 67279 | |
2021-11-12 15:36 | DenisChenu | Note Added: 67280 | |
2021-11-12 15:36 | DenisChenu | Summary | Strange sort order of question groups in statistics => Strange sort order of question groups in simple statistics |
2021-11-12 15:36 | DenisChenu | Zoho Project Synchronization | Yes => |Yes| |
2021-11-22 17:19 | DenisChenu | Changeset attached | => LimeSurvey master 7238a601 |
2021-11-22 17:19 | DenisChenu | Note Added: 67479 | |
2021-11-22 17:19 | DenisChenu | Assigned To | ollehar => DenisChenu |
2021-11-22 17:19 | DenisChenu | Resolution | open => fixed |
2021-11-22 17:21 | ollehar | Status | assigned => resolved |
2021-12-01 09:22 | DarioRoig | Issue Monitored: DarioRoig | |
2021-12-01 09:22 | DarioRoig | Bug heat | 4 => 12 |
2021-12-01 09:26 | DarioRoig | Note Added: 67618 | |
2021-12-01 09:26 | DarioRoig | Bug heat | 12 => 14 |
2021-12-01 11:27 | DenisChenu | Note Added: 67633 | |
2021-12-05 19:01 | DenisChenu | Relationship added | parent of 17777 |
2022-01-05 09:35 | LimeBot | Zoho Project Synchronization | Yes => |Yes| |
2022-01-05 09:35 | LimeBot | Note Added: 67911 | |
2022-01-05 09:35 | LimeBot | Status | resolved => closed |
2022-01-05 09:35 | LimeBot | Bug heat | 14 => 16 |
2022-02-22 22:40 | Changeset attached | => LimeSurvey master 506dd2a4 | |
2022-02-22 22:40 | guest | Note Added: 68369 | |
2022-02-22 22:40 | guest | Bug heat | 16 => 18 |