Bug 31233 - Fine grace period in circulation conditions is misnamed
Summary: Fine grace period in circulation conditions is misnamed
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Katrin Fischer
QA Contact: Kyle M Hall
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-25 08:59 UTC by Katrin Fischer
Modified: 2023-06-08 22:32 UTC (History)
4 users (show)

See Also:
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


Attachments
Bug 31233: Amend 'fine grace period' as it's also used for suspensions (2.16 KB, patch)
2022-11-19 21:01 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 31233: Amend 'fine grace period' as it's also used for suspensions (2.21 KB, patch)
2022-11-21 18:22 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 31233: Amend 'fine grace period' as it's also used for suspensions (2.27 KB, patch)
2022-12-16 18:02 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 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 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 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.