Overdue fine not calculated correctly for recalled item

Description

Overview: A BugFest tester reported this and Holly has reproduced it.

Steps to Reproduce:

  1. Log into Kiwi BugFest as an admin

  2. Find an item that has been overdue for at least 2 weeks (using Overdue Loans Report).

  3. Update the Loan Policy in effect for the overdue item as follows:
    LOAN POLICY
    Grace period = blank
    Recall return interval = 1 Minute(s)
    Minimum guaranteed loan period for recalled items = 1 Minute(s)

  4. Recall the overdue item.

  5. Update the Overdue Fine Policy in effect for the overdue item as follows:
    OVERDUE FINE POLICY
    Overdue fine = <doesn't matter>
    Count closed days/hours/minutes = No
    Maximum overdue fine = 9999999999.99 (same as not having one)
    Forgive overdue fine if item renewed = No
    Overdue recall fine = 1.00 per hour
    Ignore grace periods for recalls = Yes
    Maximum recall overdue fine = 9999999999.99 (same as not having one)

  6. Verify that a Calendar is in effect with some open time and some closed time.

  7. Return item, which will automatically calculate the overdue fine.

  8. Verify overdue fine calculated properly.

Expected Results:
Overdue fine on recalled item calculated correctly. In my case, I used Mickey Mouse and returned a book on November 2, 2021 at 4:44 PM that was actually due on October 18, 2021 at 11:08 PM. The Service Point was open Monday-Friday from 9:00 AM until 11:30 PM. The calculation should have been something like this...

Overdue fine for 10/18 = 0.50 (11:08 PM - 11:30 PM)
Overdue fine for 10/19 = 14.50 (9:00 AM - 11:30 PM)
Overdue fine for 10/20 = 14.50 (9:00 AM - 11:30 PM)
Overdue fine for 10/21 = 14.50 (9:00 AM - 11:30 PM)
Overdue fine for 10/22 = 14.50 (9:00 AM - 11:30 PM)
Overdue fine for 10/23 = 0.00
Overdue fine for 10/24 = 0.00
Overdue fine for 10/25 = 14.50 (9:00 AM - 11:30 PM)
Overdue fine for 10/26 = 14.50 (9:00 AM - 11:30 PM)
Overdue fine for 10/27 = 14.50 (9:00 AM - 11:30 PM)
Overdue fine for 10/28 = 14.50 (9:00 AM - 11:30 PM)
Overdue fine for 10/29 = 14.50 (9:00 AM - 11:30 PM)
Overdue fine for 10/30 = 0.00
Overdue fine for 10/31 = 0.00
Overdue fine for 11/1 = 14.50 (9:00 AM - 11:30 PM)
Overdue fine for 11/2 = 8.00 (9:00 AM - 4:44 PM)

The total overdue fine should be about 153.50.

Actual Results:
Overdue fine on recalled item is lower than it should be. In my case, it was only 139.00. See attached screen print for details.
(Please note that even though the Overdue Fine Policy is named Holly-1-per-min, the overdue fine being billed for recalled items is indeed 1.00 per hour.)

Additional Information:
URL:
Interested parties:

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

Attachments

3

Checklist

hide

TestRail: Results

Activity

Show:

Holly MistlebauerNovember 8, 2021 at 4:03 PM

I didn't notice the exception. Sorry for my confusion.

Roman BarannykNovember 5, 2021 at 10:10 AM

, I've investigated this issue. I looked at the calendar for Regeinstain Circulation, 1-st Floor service point. 

This service point is open Monday-Friday from 9:00 AM until 11:30 PM:

Also, I checked exceptional library hours for October 2021 and the was one exceptional day on October 28th

 

Overdue fine for 10/18 = 0.50 (11:08 PM - 11:30 PM)
Overdue fine for 10/19 = 14.50 (9:00 AM - 11:30 PM)
Overdue fine for 10/20 = 14.50 (9:00 AM - 11:30 PM)
Overdue fine for 10/21 = 14.50 (9:00 AM - 11:30 PM)
Overdue fine for 10/22 = 14.50 (9:00 AM - 11:30 PM)
Overdue fine for 10/23 = 0.00
Overdue fine for 10/24 = 0.00
Overdue fine for 10/25 = 14.50 (9:00 AM - 11:30 PM)
Overdue fine for 10/26 = 14.50 (9:00 AM - 11:30 PM)
Overdue fine for 10/27 = 14.50 (9:00 AM - 11:30 PM)
Overdue fine for 10/28 = 14.50 (9:00 AM - 11:30 PM)  it shouldn't be calculated since it was an exceptional day
Overdue fine for 10/29 = 14.50 (9:00 AM - 11:30 PM)
Overdue fine for 10/30 = 0.00
Overdue fine for 10/31 = 0.00
Overdue fine for 11/1 = 14.50 (9:00 AM - 11:30 PM)
Overdue fine for 11/2 = 8.00 (9:00 AM - 4:44 PM)

 

So, considering Count closed days/hours/minutes = No option in Overdue Fine Policy closed days (including exceptional days) should be excluded from calculating an overdue period.

 

So, let's sum all working minutes:

22 + 870 * 9 + 464 = 8316 min; 

8316 / 60 = 138.6 ~ 139 hr 

So, seems like the overdue fine was calculated correctly

Cannot Reproduce

Details

Assignee

Reporter

Priority

Sprint

Development Team

Vega

Release

R3 2021 Bug Fix

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created November 2, 2021 at 3:56 PM
Updated January 21, 2022 at 2:15 PM
Resolved November 8, 2021 at 4:03 PM
TestRail: Cases
TestRail: Runs