Bug 34938 - Add collection column to holds ratio report (circ/reserveratios.pl)
Summary: Add collection column to holds ratio report (circ/reserveratios.pl)
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Lucas Gass
QA Contact: Kyle M Hall
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-27 18:33 UTC by Lucas Gass
Modified: 2024-01-24 14:48 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact: Lucy Vaux-Harvey
Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/824
Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.06


Attachments
Bug 34938: Add collection column to hold ratio report (3.40 KB, patch)
2023-09-27 18:42 UTC, Lucas Gass
Details | Diff | Splinter Review
HoldsRatio_Screenshot (49.54 KB, image/png)
2023-09-27 21:09 UTC, Kristi
Details
Bug 34938: Add collection column to hold ratio report (3.46 KB, patch)
2023-10-02 20:24 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 34938: Add collection column to hold ratio report (3.52 KB, patch)
2023-11-03 15:59 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 34938: (QA follow-up) Tidy code (2.78 KB, patch)
2023-11-03 15:59 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass 2023-09-27 18:33:07 UTC
It would be helpful if the holds ratio report had a column displaying collection.
Comment 1 Lucas Gass 2023-09-27 18:42:13 UTC
Created attachment 156305 [details] [review]
Bug 34938: Add collection column to hold ratio report

To test:
1. Create enough holds on items so that they will appear on the holds ratio report.
2. Visit circ/reserveratios.pl by going to Circulation > Holds ratios
3. No collection column.
4. Apply patch and restart services
5. Look again at circ/reserveratios.pl, now you should see a collection column.
6. Ensure that the data in the column looks correct.
7. Go to Administration > Table settings to ensure you can hide that column, and other columns in the table.
Comment 2 Lucas Gass 2023-09-27 18:51:06 UTC
If testing on KTD you'll likely need to make sure you turn strict_sql_modes off in the koha-conf because it doesn't like GROUP BY.
Comment 3 Kristi 2023-09-27 21:09:03 UTC
Created attachment 156308 [details]
HoldsRatio_Screenshot
Comment 4 Kristi 2023-09-27 21:10:03 UTC
In testing, when I go to Circulation > Holds ratios, I get the errors in the attached screenshot. 
If this is user error on my part, please let me know how I can adjust.
Comment 5 Liz Rea 2023-09-27 22:02:33 UTC
Hi,
NOt sure you did anything strictly wrong here - Lucas points out that the testing docker (which the sandboxes use) needs to have a very specific setting disabled, and I'm not sure - but will check! - that the sandboxes allow turning that setting off, which would make it challenging to test this bug there. 

We'll see if there is a way we can allow this kind of bug to be tested in the sandboxes.

Cheers,
Liz

(In reply to Kristi from comment #4)
> In testing, when I go to Circulation > Holds ratios, I get the errors in the
> attached screenshot. 
> If this is user error on my part, please let me know how I can adjust.
Comment 6 Lucas Gass 2023-09-28 12:31:30 UTC
(In reply to Kristi from comment #4)
> In testing, when I go to Circulation > Holds ratios, I get the errors in the
> attached screenshot. 
> If this is user error on my part, please let me know how I can adjust.

Kristi, this is the thing I mention here: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34938#c2

KTD and the sandboxes are set by default with SQL strict mode enabled. Since the code in reserveratios.pl contains several GROUP BY's it fails with strict mode on.
Comment 7 Andrew Fuerste-Henry 2023-10-02 20:24:38 UTC
Created attachment 156462 [details] [review]
Bug 34938: Add collection column to hold ratio report

To test:
1. Create enough holds on items so that they will appear on the holds ratio report.
2. Visit circ/reserveratios.pl by going to Circulation > Holds ratios
3. No collection column.
4. Apply patch and restart services
5. Look again at circ/reserveratios.pl, now you should see a collection column.
6. Ensure that the data in the column looks correct.
7. Go to Administration > Table settings to ensure you can hide that column, and other columns in the table.

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Comment 8 Kyle M Hall 2023-11-03 15:59:26 UTC
Created attachment 158347 [details] [review]
Bug 34938: Add collection column to hold ratio report

To test:
1. Create enough holds on items so that they will appear on the holds ratio report.
2. Visit circ/reserveratios.pl by going to Circulation > Holds ratios
3. No collection column.
4. Apply patch and restart services
5. Look again at circ/reserveratios.pl, now you should see a collection column.
6. Ensure that the data in the column looks correct.
7. Go to Administration > Table settings to ensure you can hide that column, and other columns in the table.

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 9 Kyle M Hall 2023-11-03 15:59:44 UTC
Created attachment 158348 [details] [review]
Bug 34938: (QA follow-up) Tidy code

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 10 Tomás Cohen Arazi 2023-11-08 14:42:54 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 11 Fridolin Somers 2023-11-11 01:11:51 UTC
Small enhancement, I choose to backport

Pushed to 23.05.x for 23.05.06
Comment 12 Lucy Vaux-Harvey 2024-01-23 16:06:17 UTC
New screenshot added
Comment 13 Lucas Gass 2024-01-23 18:10:34 UTC
(In reply to Lucy Vaux-Harvey from comment #12)
> New screenshot added

Lucy, see comment #2: 

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34938#c2
Comment 14 Lucy Vaux-Harvey 2024-01-24 14:48:23 UTC
(In reply to Lucas Gass from comment #13)
> (In reply to Lucy Vaux-Harvey from comment #12)
> > New screenshot added
> 
> Lucy, see comment #2: 
> 
> https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34938#c2

Thanks Lucas, all worked fine for producing a new screenshot for the manual - https://koha-community.org/manual/latest/en/html/circulation.html#hold-ratios