Details
-
Story
-
Status: Closed (View Workflow)
-
P2
-
Resolution: Done
-
None
-
None
-
-
EPAM-Veg Sprint 35, EPAM-Veg Sprint 36, EPAM-Veg Sprint 42
-
3
-
Vega
Description
To see how this JIRA issue integrates with the other automated patron blocks JIRA issues please see the diagram at https://drive.google.com/file/d/1D9tZE-EgTZYRV28Wc2ghpfHIdnqBwpr2/view?usp=sharing
Purpose: Determine if patron should be blocked from borrowing, renewing and/or requesting.
Background
- This process will be accessed from User Information, Checkout, Renewals and New Requests.
- The Patron Barcode and Patron Group will be passed to this process (passing the Patron Group may save some time).
- This process will respond with one or more sets of three Blocked Action flags (Borrowing or Renewals or Requests) and the Message to be displayed if the patron should be blocked.
- See attachment Patron-blocks-settings-example.JPG for information about the Patron Blocks Conditions and Patron Blocks Limits settings, including an example of how an institution might set them up. These settings need to be in place for automated patron blocks to work.
- We need to check for all 6 conditions rather than stop when the first block is encountered. The users want to see all that apply.
Scenarios
Maximum outstanding fee/fine balance
- Scenario
Given Settings ==> Users ==> Patron Groups ==> Conditions ==> Maximum outstanding fee/fine balance
and Settings ==> Users ==> Patron Groups ==> Limits ==> Maximum outstanding fee/fine balance
and Patron group (from calling process)
When Blocked Actions Borrowing flag or Renewals flag or Requests flag = "Yes" and Patron Group Limit for Maximum outstanding fee/fine balance not blank
Then calculate total Remaining Amount for all open fees/fines for patron - Scenario
Given total Remaining Amount for all open fees/fines for Patron Barcode
When greater than Patron Group Limit for Maximum outstanding fee/fine balance
Then return Blocked Actions Borrowing flag, Renewals flag and Requests flag plus Message for be displayed for Maximum outstanding fee/fine balance to calling process
Maximum number of items charged out
- Scenario
Given Settings ==> Users ==> Patron Groups ==> Conditions ==> Maximum number of items charged out
and Settings ==> Users ==> Patron Groups ==> Limits ==> Maximum number of items charged out
and Patron Group (from calling process)
When Blocked Actions Borrowing flag or Renewals flag or Requests flag is checked and Patron Group Limit for Maximum number of items charged out not blank
Then add up number of open loans (Item Status = Checked out) for patron - Scenario
Given total number of open loans for Patron Barcode
When greater than Patron Group Limit for Maximum number of items charged out
Then return Blocked Actions Borrowing flag, Renewals flag and Requests flag plus Message to be displayed for Maximum number of items charged out to calling process
Maximum number of lost items
- Scenario
Given Settings ==> Users ==> Patron Groups ==> Conditions ==> Maximum number of lost items
and Settings ==> Users ==> Patron Groups ==> Limits ==> Maximum number of lost items
and Patron Group (from calling process)
When Blocked Actions Borrowing flag or Renewals flag or Requests flag is checked and Patron Group Limit for Maximum number of lost items not blank
Then add up number of open fees/fines for lost items (Item Status = "Aged to lost" or "Declared lost") for patron - Scenario
Given total number of lost items for Patron Barcode
When greater than Patron Group Limit for Maximum number of lost items
Then return Blocked Actions Borrowing flag, Renewals flag and Requests flag plus Message to be displayed for Maximum number of lost items to calling process
Maximum number of overdue items
- Scenario
Given Settings ==> Users ==> Patron Groups ==> Conditions ==> Maximum number of overdue items
and Settings ==> Users ==> Patron Groups ==> Limits ==> Maximum number of overdue items
and Patron Group (from calling process)
When Blocked Actions Borrowing flag or Renewals flag or Requests flag is checked and Patron Group Limit for Maximum number of overdue items
Then call process created byCIRC-548(Calculate intervals between due-date and returned/renewed-date) once for each checked out item with system date/time > Due Date for patron - Scenario
Given overdueMinutes (from called process created byCIRC-548(Calculate intervals between due-date and returned/renewed-date) for item
When overdueMinutes > 0
Then count item as overdue - Scenario
Given total number of overdue items for Patron Barcode
When greater than Patron Group Limit for Maximum number of overdue items
Then return Blocked Actions Borrowing flag, Renewals flag and Requests flag plus Message to be displayed for Maximum number of overdue items to calling process
Important note: The two recall calculations should be combined to save processing time!
Maximum number of overdue recalls
- Scenario
Given Settings ==> Users ==> Patron Groups ==> Conditions ==> Maximum number of overdue recalls
and Settings ==> Users ==> Patron Groups ==> Limits ==> Maximum number of overdue recalls
and Patron Group (from calling process)
When Blocked Actions Borrowing flag or Renewals flag or Requests flag is checked and Patron Group Limit for Maximum number of overdue recalls
Then call process created byCIRC-548(Calculate intervals between due-date and returned/renewed-date) once for each checked out item with dueDateChangedByRecall = "true" AND with system date/time > Due Date for patron - Scenario
Given overdueMinutes (from called process created byCIRC-548(Calculate intervals between due-date and returned/renewed-date) for item
When overdueMinutes > 0
Then count item as overdue recall - Scenario
Given total number of overdue recalls for Patron Barcode
When greater than Patron Group Limit for Maximum number of overdue recalls
Then return Blocked Actions Borrowing flag, Renewals flag and Requests flag plus Message to be displayed for Maximum number of overdue recalls to calling process
Recall overdue by maximum number of days
- Scenario
Given Settings ==> Users ==> Patron Groups ==> Conditions ==> Recall overdue by maximum number of days
and Settings ==> Users ==> Patron Groups ==> Limits ==> Recall overdue by maximum number of days
and Patron Group (from calling process)
When Blocked Actions Borrowing flag or Renewals flag or Requests flag is checked and Patron Group Limit for Recall overdue by maximum number of days
Then call process created byCIRC-548(Calculate intervals between due-date and returned/renewed-date) once for each checked out item with dueDateChangedByRecall = "true" AND with system date/time > Due Date for patron
(Note: After you find one recall overdue by more than the maximum number of days, you don't need to process the remaining items.) - Scenario
Given overdueMinutes (from called process created byCIRC-548(Calculate intervals between due-date and returned/renewed-date) for item
When overdueMinutes > 0
Then divide overdueMinutes by 1440 (the number of minutes in a day), rounding up to next day (for example: if the result is .48, then the answer is 1 day; if the result is 1.24, then the answer is 2 days) - Scenario
Given total number of days recall overdue for item
When greater than Patron Group Limit for Recall overdue by maximum number of days
Then return Blocked Actions Borrowing flag, Renewals flag and Requests flag plus Message to be displayed for Recall overdue by maximum number of days to calling process
oleksandrkurash
Technical details:
Create GET /automated-patron-blocks/(patronId) endpoint that would help other modules to determine if patron has any blocks.
https://wiki.folio.org/display/DD/Automated+Patron+Blocks+feature+design contains example of the response (Approach 2 / API).
TestRail: Results
Attachments
Issue Links
- blocks
-
MODPATBLK-8 Exclude claim returned items from automated patron block limits
-
- Closed
-
-
UICHKOUT-627 Patron Blocks: Is there an automated patron block on borrowing?
-
- Closed
-
-
UIREQ-471 Patron Blocks: Is there an automated patron block on requesting?
-
- Closed
-
-
UIU-1273 Patron Blocks: Display automated patron block(s) on User Information page
-
- Closed
-
-
UIU-1276 Patron Blocks: Is there an automated patron block on renewing?
-
- Closed
-
- defines
-
UXPROD-82 Automated Patron Blocks
-
- Closed
-
- has to be finished together with
-
CIRC-663 Create new endpoint for overdue minutes calculation
-
- Closed
-
- is blocked by
-
CIRC-548 (1-OD-B-1) Calculate intervals between due-date and returned/renewed-date
-
- Closed
-
-
MODFEE-39 [SPIKE] Choose a module for MODFEE-31 implementation
-
- Closed
-
-
MODPATBLK-5 Handle FEE_FINE_BALANCE_CHANGED events
-
- Closed
-
-
MODPATBLK-6 Move patron block conditions and limits functionality to mod-patron-blocks
-
- Closed
-
-
MODPATBLK-11 Handle ITEM_CHECKED_OUT events
-
- Closed
-
-
MODPATBLK-12 Handle ITEM_CHECKED_IN events
-
- Closed
-
-
MODPATBLK-13 Handle ITEM_DECLARED_LOST events
-
- Closed
-
-
MODPATBLK-14 Handle LOAN_DUE_DATE_CHANGED events
-
- Closed
-
-
MODUSERS-174 BE: (3-APB-A) Create Patron Blocks Conditions API
-
- Closed
-
-
MODUSERS-175 BE: (3-APB-?) Create Patron Blocks Limits Table
-
- Closed
-
-
MODUSERS-176 BE: (3-APB-A) Create Patron Blocks Conditions table
-
- Closed
-
-
MODUSERS-177 BE: (3-APB-?) Create Patron Blocks Limits API
-
- Closed
-
-
UIU-1167 (3-APB-C) Maintain Patron Blocks Limits Table entries (in frontend)
-
- Closed
-
-
UIU-1272 FE: (3-APB-A) Create Patron Blocks Conditions Table
-
- Closed
-
- is cloned by
-
MODPATBLK-18 Patron Blocks: use calendar to determine loans overdue status
-
- Closed
-
- relates to
-
MODUSERS-194 Patron block pathPattern leading slash missing
-
- Closed
-
-
MODPATBLK-20 Automated patron block 'Maximum number of items charged out' not working properly
-
- Closed
-
-
MODPATBLK-21 Automated patron block 'Maximum number of lost items' is not clearing properly
-
- Closed
-