View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
18459 | Bug reports | Other | public | 2022-11-05 12:59 | 2024-05-02 14:37 |
Reporter | Mazi | Assigned To | tibor.pacalat | ||
Priority | normal | Severity | partial_block | ||
Status | closed | Resolution | fixed | ||
Product Version | 3.28.x | ||||
Summary | 18459: When filtering the survey list by a parent survey group, surveys assigned to a child survey group are not listed | ||||
Description | At the survey list surveys assigned to a child survey group are not listed when selecting the parent survey group as a filter, see screenshot. | ||||
Steps To Reproduce | Steps to reproduceCreate a parent survey group P. Expected resultThe survey assigned to child survey group C should show up. Actual resultSurvey is not listed when applying that filter. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 12 | ||||
Complete LimeSurvey version number (& build) | 3.28.32 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | MariaDB 10.1.48 | ||||
Server OS (if known) | |||||
Webserver software & version (if known) | |||||
PHP Version | PHP 7.4 | ||||
@ollehar, can we assign this to a developer please? |
|
This is tricky. The filter is "Group" and the expectation (from the bug case) is to be able to filter by any ancestor. If so, I must tell it is a tricky thing as it could involve some recursion. Thanks |
|
Yes, when filtering for the parent group, I expect surveys of child groups to not get ignored but listed as well since they belong to the parent group. |
|
Sorry, as to clarify: the case is you want to filter surveys not by its parent group but by an ancesotr, right? Ex: You want to filter surveys by Nova and see surveys "Research Sydney" and "Research Melbourne". |
|
Correct! |
|
It is a tricky thing as it could involve some recursion. Something I have in mind for making things not DB intensive:
From a technical point of view, not very fan of this type of filters. @ollehar, thoughts? |
|
@gabrieljenik: Sound good. And a nesting level of 5 should definitely be sufficient. Would love to see this implemented because if confused more than 1 customer that surveys of child groups have not been shown when filtering. |
|
What about free text search "Nova"? Does it include survey group name too? |
|
One possible easy fix is to join with the first parent-child relation as a default, and ignore deeper levels. |
|
Just choose the poison, I will implement it :) The join thing could be a workaround, although probably will always be a customer for which will fall short. Another option could be to solve it through a new plugin event and a plugin? |
|
If we're fine with having a limit, a child-parent relation can be fetched x levels down with x number of SQL JOINs. Maybe you can check what that would look like in code, Gabriel? To just fetched the first level. |
|
No additional plugin please. Many customers have at least one sub-group so that affects a lot of people. If I'd have to activate a plugin first to make a basic search feature work, that's not user friendly. |
|
Alright, so many two levels to start with? |
|
+1 at 100% out of plugin too (exceptional for me) Maybe we can cache the childs, empty the cache when a group is saved, created or deleted |
|
PR for v3: https://github.com/LimeSurvey/LimeSurvey/pull/3147 |
|
@Mazi : maybe you can test on 3.X ? |
|
@gabrieljenik, I replaced the survey.php file with the one from your commit at my v3.28.xx version. The survey group search worked as expected. But when I searched the survey list for "test" I got this error (see screenshot for relation to survey.php): CDbException /var/www/vhosts/my-survey.host/httpdocs/ls3dev.my-survey.host/ls/framework/db/CDbCommand.php(543) |
|
Issue confirmed Another issue with id=2 if group 2 have subgroups How to reproduce Create SurveyGroup aaa See screencast. Maybe time to remove this awful line … https://github.com/LimeSurvey/LimeSurvey/blob/0c9c5c8efe51b5af785c34b059c75ce206d906ad/application/models/Survey.php#LL1646C18-L1646C18 |
|
Your expectation is to have 2 surveys being shown at the end of your test? |
|
Yes, i think it's the expectation ping @Mazi ? |
|
Done |
|
Master PR: https://github.com/LimeSurvey/LimeSurvey/pull/3167 |
|
3+5+6 reviewed |
|
Did you test it too Denis, or just read the code? |
|
Else maybe Mazi can test. :) |
|
I test the 3.X version, but not 5 and 6 since it's near same code. |
|
We can test... but next week. (non labour today and tomorrow) :) |
|
Fix committed to 5.x branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=34780 |
|
PR with extra test on v5: https://github.com/LimeSurvey/LimeSurvey/pull/3201 |
|
Fixed in Release 5.6.26+230613 |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=34809 |
|
Fix committed to 5.x branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=36317 |
|
LimeSurvey: 5.x 01ac6e10 2023-06-05 17:01 Gabriel Jenik Committer: GitHub Details Diff |
Fixed issue 18459: When filtering the survey list by a parent survey group, surveys assigned to a child survey group are not listed (#3168) Co-authored-by: lapiudevgit <devgit@lapiu.biz> |
Affected Issues 18459 |
|
mod - application/models/Survey.php | Diff File | ||
LimeSurvey: master a9d6f855 2023-06-13 17:32 Gabriel Jenik Committer: GitHub Details Diff |
Fixed issue 18459: When filtering the survey list by a parent survey group, surveys assigned to a child survey group are not listed (#3167) * Fixed issue 18459: When filtering the survey list by a parent survey group, surveys assigned to a child survey group are not listed * Fixed issue 18459: When filtering the survey list by a parent survey group, surveys assigned to a child survey group are not listed Tests added. * Fixed issue 18459: When filtering the survey list by a parent survey group, surveys assigned to a child survey group are not listed Test for multiple surveys added. * Fixed issue 18459: When filtering the survey list by a parent survey group, surveys assigned to a child survey group are not listed Test for any survey group id added. * Fixed issue 18459: When filtering the survey list by a parent survey group, surveys assigned to a child survey group are not listed Survey count error fixed. * DEV: Review test failure * DEV: Review failing test * DEV: Review failing test * DEV: Review failing test * DEV: Review failing test * DEV: Review failing test --------- Co-authored-by: lapiudevgit <devgit@lapiu.biz> |
Affected Issues 18459 |
|
mod - application/models/Survey.php | Diff File | ||
add - tests/unit/models/SurveySearchTest.php | Diff File | ||
LimeSurvey: 5.x b423f2d8 2024-05-02 16:21 Gabriel Jenik Committer: GitHub Details Diff |
Fixed issue 18459: When filtering the survey list by a parent survey group, surveys assigned to a child survey group are not listed (#3201) |
Affected Issues 18459 |
|
add - tests/unit/models/SurveySearchTest.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2022-11-05 12:59 | Mazi | New Issue | |
2022-11-05 12:59 | Mazi | File Added: image.png | |
2022-11-05 12:59 | Mazi | File Added: image-2.png | |
2022-11-07 14:22 | gabrieljenik | Status | new => confirmed |
2023-04-11 12:21 | Mazi | Note Added: 74457 | |
2023-04-11 12:21 | Mazi | Bug heat | 0 => 2 |
2023-04-11 13:11 | ollehar | Assigned To | => gabrieljenik |
2023-04-11 13:11 | ollehar | Status | confirmed => assigned |
2023-04-11 13:11 | ollehar | Priority | none => normal |
2023-04-21 20:15 | gabrieljenik | Note Added: 74591 | |
2023-04-21 20:15 | gabrieljenik | Bug heat | 2 => 4 |
2023-05-11 15:24 | gabrieljenik | Status | assigned => feedback |
2023-05-11 15:40 | Mazi | Note Added: 74933 | |
2023-05-11 15:40 | Mazi | Status | feedback => assigned |
2023-05-11 16:38 | gabrieljenik | Note Added: 74934 | |
2023-05-11 16:51 | Mazi | Note Added: 74935 | |
2023-05-11 16:56 | gabrieljenik | Note Added: 74936 | |
2023-05-11 18:06 | Mazi | Note Added: 74937 | |
2023-05-12 10:00 | ollehar | Note Added: 74942 | |
2023-05-12 10:00 | ollehar | Bug heat | 4 => 6 |
2023-05-12 10:01 | ollehar | Note Added: 74943 | |
2023-05-12 13:57 | gabrieljenik | Note Added: 74952 | |
2023-05-12 14:02 | ollehar | Note Added: 74953 | |
2023-05-12 14:02 | ollehar | Note Edited: 74953 | |
2023-05-12 14:50 | Mazi | Note Added: 74954 | |
2023-05-12 14:52 | ollehar | Note Added: 74955 | |
2023-05-12 14:52 | ollehar | Note Edited: 74955 | |
2023-05-12 16:28 | DenisChenu | Note Added: 74956 | |
2023-05-12 16:28 | DenisChenu | Bug heat | 6 => 8 |
2023-05-17 22:08 | gabrieljenik | Note Added: 75049 | |
2023-05-17 22:09 | gabrieljenik | Note Edited: 75049 | |
2023-05-17 23:17 | gabrieljenik | Assigned To | gabrieljenik => DenisChenu |
2023-05-17 23:17 | gabrieljenik | Status | assigned => ready for code review |
2023-05-19 10:15 | DenisChenu | Assigned To | DenisChenu => gabrieljenik |
2023-05-19 10:15 | DenisChenu | Status | ready for code review => ready for testing |
2023-05-19 10:15 | DenisChenu | Note Added: 75098 | |
2023-05-21 20:18 | Mazi | Note Added: 75126 | |
2023-05-22 08:52 | DenisChenu | Note Added: 75127 | |
2023-05-22 08:52 | DenisChenu | File Added: Peek 22-05-2023 08-51.gif | |
2023-05-22 14:31 | gabrieljenik | Note Added: 75134 | |
2023-05-22 14:50 | DenisChenu | Note Added: 75136 | |
2023-05-23 22:59 | gabrieljenik | Note Added: 75202 | |
2023-05-24 21:39 | gabrieljenik | Note Added: 75220 | |
2023-05-25 08:33 | DenisChenu | Note Added: 75221 | |
2023-05-25 10:57 | ollehar | Note Added: 75222 | |
2023-05-25 10:57 | ollehar | Note Added: 75223 | |
2023-05-25 11:55 | DenisChenu | Note Added: 75224 | |
2023-05-25 13:58 | gabrieljenik | Note Added: 75227 | |
2023-06-05 15:01 | Changeset attached | => LimeSurvey 5.x 01ac6e10 | |
2023-06-05 15:01 | guest | Note Added: 75420 | |
2023-06-05 15:01 | guest | Bug heat | 8 => 10 |
2023-06-05 15:07 | tibor.pacalat | Assigned To | gabrieljenik => tibor.pacalat |
2023-06-05 15:07 | tibor.pacalat | Status | ready for testing => in testing |
2023-06-08 14:50 | gabrieljenik | Note Added: 75476 | |
2023-06-12 10:49 | LimeBot | Note Added: 75544 | |
2023-06-12 10:49 | LimeBot | Status | in testing => closed |
2023-06-12 10:49 | LimeBot | Resolution | open => fixed |
2023-06-12 10:49 | LimeBot | Bug heat | 10 => 12 |
2023-06-12 14:57 | gabrieljenik | Status | closed => ready for merge |
2023-06-13 15:32 | tibor.pacalat | Status | ready for merge => closed |
2023-06-13 15:46 | Changeset attached | => LimeSurvey master a9d6f855 | |
2023-06-13 15:46 | guest | Note Added: 75612 | |
2024-05-02 14:37 | Changeset attached | => LimeSurvey 5.x b423f2d8 | |
2024-05-02 14:37 | guest | Note Added: 80066 |