[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
Wed Feb 20 20:43:14 CET 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14293

Arthur Suzuki <arthur.suzuki at biblibre.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #85252|0                           |1
        is obsolete|                            |

--- Comment #14 from Arthur Suzuki <arthur.suzuki at biblibre.com> ---
Created attachment 85407
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85407&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>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list