Details
-
Type:
Story
-
Status: Closed (View Workflow)
-
Priority:
P2
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 18.0.0
-
Template:customfield_11100 30823
-
Sprint:EPAM-Veg Sprint 31, EPAM-Veg Sprint 32, EPAM-Veg Sprint 33
-
Story Points:5
-
Development Team:Vega
Description
To see how this JIRA issue integrates with the other overdue fine JIRA issues please see the diagram at https://drive.google.com/file/d/1uzezgYpgZ8XiSmSdqC2fntda1HomjbP-/view?usp=sharing
OVERVIEW
Purpose: Module to calculate number of minutes an item is returned or renewed late, considering the grace period and/or closed hours if an institution has elected to have one or both considered. Initially this process will be used by the overdue fine calculation process (CIRC-524) and automated patron block determination process (UIU-1168).
Inputs:
From Loan record
- Due date
- Loan policy (need to know applied Loan policy in order to access Grace period)
- Overdue fine policy (need to know applied Overdue fine policy in order to access Count closed days/hours/minutes and Ignore grace periods for recalls (newly added, see attached screen mock-up Automated Overdue Fines - Loan Details Changes.png)
- dueDateChangedByRecall (this is an existing back-end flag that is not displayed in the UI)
From Loan Policy record
- Grace period
- Loan period
From Overdue Fine Policy record
- Count closed days/hours/minutes
- Ignore grace periods for recalls
Also Library Calendar, which is established at Settings>Calendar, to see when library is opened/closed
Outputs:
- overdueMinutes
Processing Considerations:
- Does library have a grace period? (A grace period is a short period of time after the due date during with the library allows the item to be returned with charging an overdue fine.)
- Does library count closed days? (Libraries may elect to include the minutes/hours/days they are closed as part of the overdue calculation. If they don't, the library's calendar must be used to determine if/when the library was opened for each day the item was overdue.)
- Is returned item the result of a recall? (Items that are requested by other patrons while they are checked out are called recalls. The patron who currently has the item checked out is given a certain amount of time to return the book. The institution may ignore the grace period for a recalled item.)
DETAILS OF CALCULATION
The smallest allowable interval is minutes, so the best approach is to convert everything to minutes for the calculations, then convert back to hours, days, weeks or month as needed.
Convert Grace period into minutes
- If dueDateChangedByRecall (from Loan record) = "true" and Ignore grace periods for recalls (from Overdue Loan Policy) = "Yes" <=====means the item has been recalled, and grace periods are not considered for recalled items
- Set minutesGracePeriod = 0
- Else
- If Grace period (from Loan Policy) is > 0
- If Grace period interval = Hour(s)
- Set minutesGracePeriod = Grace period * 60
- Else if Grace period interval = Day(s)
- Set minutesGracePeriod = Grace period * 1440
- Else if Grace period interval = Week(s)
- Set minutesGracePeriod = Grace period * 10080
- Else if Grace period interval = Month(s)
- Set minutesGracePeriod = Grace period * 44640
- Else
- Set minutesGracePeriod = Grace period <=====means the grace period is already in minutes
- Else
- Set minutesGracePeriod = 0 <=====means there is no grace period
Calculate overdueMinutes, which is the total minutes between Due date and current System Date/Time
- If Count closed days/hours/minutes (from Overdue Fine Policy) = "No" <=====means the institution has elected to use the actual time that has passed, regardless of the hours they have been opened
- Set overdueMinutes to total minutes between Due date (from Loan record) and current System Date/Time
- Else
- Access Library Calendar to set overdueMinutes to total open minutes between Due date (from Loan record) and current System Date/Time <=====means the institution only wants to count the time they have been open
Determine if overdueMinutes extend beyond the allowable Grace period (minutesGracePeriod)
- If overdueMinutes > minutesGracePeriod
- Do nothing else
- Else
- Set overdueMinutes = 0 <=====means the item was returned late, but it was within the institution's grace period
TestRail: Results
Attachments
Issue Links
- blocks
-
CIRC-524 (1-OD-B-2) Calculate overdue fine using Overdue Fine Policy
-
- Closed
-
-
MODPATBLK-7 Patron Blocks: Determine if one or more automated blocks exist for patron
-
- Closed
-
-
MODPATBLK-18 Patron Blocks: use calendar to determine loans overdue status
-
- Closed
-
- defines
-
UXPROD-109 Charge automated overdue fines
-
- Closed
-
- is blocked by
-
CIRC-591 (1-OD-A) When item is checked out, save effective Overdue Fine Policy and Lost Item Policy to loan record
-
- Closed
-
- relates to
-
MODFEE-213 Document calculation used for overdue fines
-
- Closed
-
-
MODFEE-215 Are seconds used in calculating overdue fines? How is rounding handled?
-
- Closed
-