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>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Lucas Gass 2024-01-26 18:43:06 +00:00 committed by Katrin Fischer
parent a08362d5ab
commit f16fe67426
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
2 changed files with 6 additions and 1 deletions

View File

@ -69,7 +69,7 @@ $enddate = $todaysdate unless $enddate;
$startdate = $todaysdate->clone->subtract( years => 1 ) unless $startdate;
if (!defined($ratio)) {
$ratio = 3;
$ratio = C4::Context->preference('HoldRatioDefault');
}
# Force to be a number
$ratio += 0;

View File

@ -695,6 +695,11 @@ Circulation:
0: "Don't store"
- 'the last patron to return an item. This setting is independent of the <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=opacreadinghistory">opacreadinghistory</a> and <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=AnonymousPatron">AnonymousPatron</a> system preferences.'
Holds policy:
-
- Default the holds ratio report to
- pref: HoldRatioDefault
class: integer
- "."
-
- In the staff interface, split the holds queue into separate tables by
- pref: HoldsSplitQueue