Bug 31233

Summary: Fine grace period in circulation conditions is misnamed
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: CirculationAssignee: Katrin Fischer <katrin.fischer>
Status: CLOSED FIXED QA Contact: Kyle M Hall (khall) <kyle>
Severity: minor    
Priority: P5 - low CC: christian.stelzenmueller, gmcharlt, kyle.m.hall, kyle
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: String patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.02
Circulation function:
Attachments: Bug 31233: Amend 'fine grace period' as it's also used for suspensions
Bug 31233: Amend 'fine grace period' as it's also used for suspensions
Bug 31233: Amend 'fine grace period' as it's also used for suspensions

Description Katrin Fischer 2022-07-25 08:59:28 UTC
The grace period is labelled "Fine grace period" in the circulation rules, but will also be used when working with suspension days.

If the chargeable units (days overdue with or without closing days) is smaller than the grace period, the suspension will not be placed. So we should change the description in circulation rules probably.


sub _calculate_new_debar_dt {
  [...]
    if ( $deltadays->subtract($grace)->is_positive() ) {
      ... place suspension restriction
Comment 1 Katrin Fischer 2022-07-28 09:53:23 UTC
After some debugging I realized that the grace period is also substracted from the overdue days before the restriction is calculated:

    if ( $deltadays->subtract($grace)->is_positive() ) {

So we should really kill the "Fine" from "Fine grace period".
Comment 2 Katrin Fischer 2022-11-19 21:01:28 UTC
Created attachment 144095 [details] [review]
Bug 31233: Amend 'fine grace period' as it's also used for suspensions

The grace period setting in circulation rules is not only used
for fines, but also for suspensions. So the label 'Fine grace period'
is a little misleading.

This patch updates it to "Fine/suspension grace period".

To test:
* Go to Administration > Circulation rules
* Verify the description is "Fine grace period" in the big table
* Apply patch
* Verify the description now changed to "Fine/suspension grace period"

https://bugs.koha-community.org/show_bug.cgi?id=32261
Comment 3 Hammat wele 2022-11-21 18:22:00 UTC
Created attachment 144114 [details] [review]
Bug 31233: Amend 'fine grace period' as it's also used for suspensions

The grace period setting in circulation rules is not only used
for fines, but also for suspensions. So the label 'Fine grace period'
is a little misleading.

This patch updates it to "Fine/suspension grace period".

To test:
* Go to Administration > Circulation rules
* Verify the description is "Fine grace period" in the big table
* Apply patch
* Verify the description now changed to "Fine/suspension grace period"

https://bugs.koha-community.org/show_bug.cgi?id=32261
Signed-off-by: Hammat Wele <hammat.wele@inlibro.com>
Comment 4 Katrin Fischer 2022-11-21 18:37:23 UTC
Thank you, Hammat!
Comment 5 Kyle M Hall (khall) 2022-12-16 18:02:54 UTC
Created attachment 144698 [details] [review]
Bug 31233: Amend 'fine grace period' as it's also used for suspensions

The grace period setting in circulation rules is not only used
for fines, but also for suspensions. So the label 'Fine grace period'
is a little misleading.

This patch updates it to "Fine/suspension grace period".

To test:
* Go to Administration > Circulation rules
* Verify the description is "Fine grace period" in the big table
* Apply patch
* Verify the description now changed to "Fine/suspension grace period"

https://bugs.koha-community.org/show_bug.cgi?id=32261
Signed-off-by: Hammat Wele <hammat.wele@inlibro.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 6 Tomás Cohen Arazi (tcohen) 2022-12-23 17:03:50 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 7 Jacob O'Mara 2023-01-13 11:55:15 UTC
Nice work, thanks everyone!

Pushed to 22.11.x for the next release.