Bug 29225

Summary: Report subgroup does not appear consistently
Product: Koha Reporter: Donna <bwsdonna>
Component: ReportsAssignee: Nick Clemens <nick>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: fridolin.somers, jonathan.druart, kyle, nick, victor
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00,21.05.05,20.11.11
Bug Depends on: 24958    
Bug Blocks:    
Attachments: Bug 29225: Don't hide subgroup filter on pag load
Bug 29225: Don't hide subgroup filter on pag load
Bug 29225: Don't hide subgroup filter on pag load

Description Donna 2021-10-13 15:27:18 UTC
It appears that bug 24958 (remember last selected tab in SQL reports) may have caused this bug.  When you leave the Saved Reports page /guided_reports.pl?phase=Use%20saved and come back to it, the tab you were on is retained, but the subgroup dropdown does not appear.  You have to click on another tab and then click back to the tab you were on to get the subgroup dropdown to show.  

To recreate:
1.  In Saved reports have one tab, such as circulation, with subgroups associated with it.  
2.  Log in and go to reports - use saved, and click on Circulation tab.  
3. Note the Subgroups drop down.
4. Run a report or go to a different area of Koha.
5. Come back to reports - Saved and see that you are still on the Circulation tab, but the Subgroups drop down does not show.
Comment 1 Nick Clemens 2021-10-14 12:33:01 UTC
Created attachment 126276 [details] [review]
Bug 29225: Don't hide subgroup filter on pag load

When we auto select the last used tab, we hit code that hides the Subgroup
dropdown

Clicking to other tabs shows the dropdown again

There is code on the tab selection to hide subgroups on the 'All' tab,
the other line seems superfluous

To test:
1 - Create a report and assign a group and subgroup, creating if necessary
2 - Browse to "Reports->Use saved"
3 - Click on the tab for the report you just created, see the subgroups dropdown
4 - Reload the page, Subgroups dropdown disappears
5 - Apply patch
6 - Relaod the page
7 - It's back!
8 - Confirm dropdown filters as expected
Comment 2 Kyle M Hall 2021-10-14 13:29:40 UTC
Created attachment 126278 [details] [review]
Bug 29225: Don't hide subgroup filter on pag load

When we auto select the last used tab, we hit code that hides the Subgroup
dropdown

Clicking to other tabs shows the dropdown again

There is code on the tab selection to hide subgroups on the 'All' tab,
the other line seems superfluous

To test:
1 - Create a report and assign a group and subgroup, creating if necessary
2 - Browse to "Reports->Use saved"
3 - Click on the tab for the report you just created, see the subgroups dropdown
4 - Reload the page, Subgroups dropdown disappears
5 - Apply patch
6 - Relaod the page
7 - It's back!
8 - Confirm dropdown filters as expected

Signed-off-by: Donna <donna@bywatersolutions.com>
Comment 3 Katrin Fischer 2021-10-20 21:22:36 UTC
Good catch!
Comment 4 Katrin Fischer 2021-10-20 21:23:09 UTC
Created attachment 126621 [details] [review]
Bug 29225: Don't hide subgroup filter on pag load

When we auto select the last used tab, we hit code that hides the Subgroup
dropdown

Clicking to other tabs shows the dropdown again

There is code on the tab selection to hide subgroups on the 'All' tab,
the other line seems superfluous

To test:
1 - Create a report and assign a group and subgroup, creating if necessary
2 - Browse to "Reports->Use saved"
3 - Click on the tab for the report you just created, see the subgroups dropdown
4 - Reload the page, Subgroups dropdown disappears
5 - Apply patch
6 - Relaod the page
7 - It's back!
8 - Confirm dropdown filters as expected

Signed-off-by: Donna <donna@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Jonathan Druart 2021-10-21 08:33:11 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 6 Kyle M Hall 2021-10-22 15:34:25 UTC
Pushed to 21.05.x for 21.05.05
Comment 7 Fridolin Somers 2021-10-23 02:13:53 UTC
Pushed to 20.11.x for 20.11.11
Comment 8 Victor Grousset/tuxayo 2021-10-26 01:06:22 UTC
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.