Bug 23208

Summary: Ability to set default ratio in holds ratio report
Product: Koha Reporter: Kelly McElligott <kelly>
Component: Hold requestsAssignee: Lucas Gass (lukeg) <lucas>
Status: RESOLVED FIXED QA Contact: Emily Lamancusa (emlam) <emily.lamancusa>
Severity: enhancement    
Priority: P5 - low CC: andrewfh, barbara.johnson, caroline.cyr-la-rose, emily.lamancusa, fridolin.somers, gmcharlt, lucas, philip.orr, rkuiper, sbrown
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Caroline Cyr La Rose Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/931
Text to go in the release notes:
This patch adds the new system preference 'HoldRatioDefault' to allow setting a different default value for the holds ratio report found in Circulation -> Holds -> Hold ratios. The default value for the new system preference is 3.
Version(s) released in:
24.05.00
Circulation function:
Attachments: Bug 23208: Add system preference HoldRatioDefault
Bug 23208: Add ability to set a default hold ratio value
Bug 23208: perltidy
Bug 23208: Add system preference HoldRatioDefault
Bug 23208: Add ability to set a default hold ratio value
Bug 23208: perltidy
Bug 23208: Add system preference HoldRatioDefault
Bug 23208: Add ability to set a default hold ratio value
Bug 23208: perltidy

Description Kelly McElligott 2019-06-25 19:13:42 UTC
Currently in the circulation Holds Ratio report that is found in the Circulation module, the ratio defaults to 2.  It would be nice to be able to specify what a library would like as default in possibly a system preference- so it is more specific to their library.  As of now, if a library wanted to set a higher / lower ratio, they would need to manually change this each time the report is run.
Comment 1 Andrew Fuerste-Henry 2021-08-10 14:02:21 UTC
+1
Comment 2 Sara Brown 2021-08-10 14:06:57 UTC
+1
Comment 3 Barbara Johnson 2024-01-16 17:41:01 UTC
This would be so helpful.  We use a higher ratio in order to better manage our budget.  Having to change it every time (and make sure all staff know that they should be changing it) takes extra time.  Maybe this could be a system preference instead of being hard coded.
Comment 4 Rhonda Kuiper 2024-01-16 17:43:09 UTC
+1
Comment 5 Lucas Gass (lukeg) 2024-01-26 18:48:31 UTC
Created attachment 161557 [details] [review]
Bug 23208: Add system preference HoldRatioDefault
Comment 6 Lucas Gass (lukeg) 2024-01-26 18:48:34 UTC
Created attachment 161558 [details] [review]
Bug 23208: Add ability to set a default hold ratio value

To test:
1. APPLY PATCH, updatedatebase, restart_all
2. Search for the system preference 'HoldRatioDefault'.
3. It should be set to 3. Change the value to something else.
4. Load the report at 'circ/reserveratios.pl'. Circulation > Hold ratios
5. The default value should be the value you set in the new system preference.
6. Run the report with the default value and make sure it works.
7. Change the value and run the report. The new value should be retained.
8. Leave the page and come back. Again the default value from the new system preference should be set.
Comment 7 Lucas Gass (lukeg) 2024-01-26 18:48:36 UTC
Created attachment 161559 [details] [review]
Bug 23208: perltidy
Comment 8 Lucas Gass (lukeg) 2024-01-26 18:52:38 UTC
It is important to note that if you are testing this with k-t-d then SQL strict mode needs to be turned off in the koha-conf.xml file by making sure the this line is set like so:

<strict_sql_modes>0</strict_sql_modes>
Comment 9 Andrew Fuerste-Henry 2024-02-02 20:56:59 UTC
Created attachment 161729 [details] [review]
Bug 23208: Add system preference HoldRatioDefault

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Comment 10 Andrew Fuerste-Henry 2024-02-02 20:57:01 UTC
Created attachment 161730 [details] [review]
Bug 23208: Add ability to set a default hold ratio value

To test:
1. APPLY PATCH, updatedatebase, restart_all
2. Search for the system preference 'HoldRatioDefault'.
3. It should be set to 3. Change the value to something else.
4. Load the report at 'circ/reserveratios.pl'. Circulation > Hold ratios
5. The default value should be the value you set in the new system preference.
6. Run the report with the default value and make sure it works.
7. Change the value and run the report. The new value should be retained.
8. Leave the page and come back. Again the default value from the new system preference should be set.

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Comment 11 Andrew Fuerste-Henry 2024-02-02 20:57:04 UTC
Created attachment 161731 [details] [review]
Bug 23208: perltidy

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Comment 12 Emily Lamancusa (emlam) 2024-02-07 22:00:54 UTC
Created attachment 161855 [details] [review]
Bug 23208: Add system preference HoldRatioDefault

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Comment 13 Emily Lamancusa (emlam) 2024-02-07 22:00:57 UTC
Created attachment 161856 [details] [review]
Bug 23208: Add ability to set a default hold ratio value

To test:
1. APPLY PATCH, updatedatebase, restart_all
2. Search for the system preference 'HoldRatioDefault'.
3. It should be set to 3. Change the value to something else.
4. Load the report at 'circ/reserveratios.pl'. Circulation > Hold ratios
5. The default value should be the value you set in the new system preference.
6. Run the report with the default value and make sure it works.
7. Change the value and run the report. The new value should be retained.
8. Leave the page and come back. Again the default value from the new system preference should be set.

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Comment 14 Emily Lamancusa (emlam) 2024-02-07 22:00:59 UTC
Created attachment 161857 [details] [review]
Bug 23208: perltidy

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Comment 15 Emily Lamancusa (emlam) 2024-02-07 22:05:31 UTC
I squashed a typo fix into the perltidy patch. Otherwise, it looks good and passes the QA checks. This is a nice addition!
Comment 16 Katrin Fischer 2024-03-25 08:47:01 UTC
The DB update was missing the "say". Please keep an eye on these :)
Comment 17 Katrin Fischer 2024-03-25 08:54:09 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 18 Fridolin Somers 2024-05-23 08:39:22 UTC
Not backported to 23.11.x