[Koha-bugs] [Bug 14293] Error in the calculation of the suspension of users per day
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Mon Nov 20 01:28:48 CET 2023
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293
David Nind <david at davidnind.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #159075|0 |1
is obsolete| |
--- Comment #47 from David Nind <david at davidnind.com> ---
Created attachment 159128
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159128&action=edit
Bug 14293: The suspension should be calculated in days
There was a mismatch between bug 13909 and bug 5549.
The get_chargeable_units call from _debar_user_on_return should specify
that we want a suspension in days.
However I don't understand the comment let by the author of bug 5549
f61a9617184ec4b24100c1d99150bfd4ebf13336
1/
> finedays is in days, so hourly loans must multiply by 24
Yes but the suspension is in days, so no need to * 24
2/ And we should have a look on this one too:
> grace period is measured in the same units as the loan
But the grace period is always in days. On the circ rules the column is
"Fine grace period (day)".
I think we should replace
DateTime::Duration->new( $unit => $issuingrule->{firstremind} );
with
DateTime::Duration->new( days => $issuingrule->{firstremind} );
Anyway, we definitelly need more tests in this area!
Test plan:
1/ Define an issuing rule with a unit=hour
2/ Set a suspension in days
3/ Check an item out and specify a past due date.
4/ Check the item in
5/ The patron should be debarred correctly
Signed-off-by: Nick Clemens <nick at quecheelibrary.org>
Signed-off-by: Arthur Suzuki <arthur.suzuki at biblibre.com>
Signed-off-by: Mark Tompsett <mtompset at hotmail.com>
Signed-off-by: David Nind <david at davidnind.com>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list