Uploaded image for project: 'mod-patron-blocks'
  1. mod-patron-blocks
  2. MODPATBLK-18

Patron Blocks: use calendar to determine loans overdue status

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Closed (View Workflow)
    • Priority: P2
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 1.1.0
    • Labels:
    • Template:
    • Sprint:
      EPAM-Veg Sprint 35, EPAM-Veg Sprint 36, EPAM-Veg Sprint 91, EPAM-Veg Sprint 92, EPAM-Veg Sprint 96
    • Story Points:
      8
    • Development Team:
      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

      1. This process will be accessed from User Information, Checkout, Renewals and New Requests.
      2. The Patron Barcode and Patron Group will be passed to this process (passing the Patron Group may save some time).
      3. 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.
      4. 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.
      5. 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

      1. 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
      2. 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

      1. 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
      2. 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

      1. 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
      2. 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

      1. 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 by CIRC-548 (Calculate intervals between due-date and returned/renewed-date) once for each checked out item with system date/time > Due Date for patron
      2. Scenario
        Given overdueMinutes (from called process created by CIRC-548 (Calculate intervals between due-date and returned/renewed-date) for item
        When overdueMinutes > 0
        Then count item as overdue
      3. 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

      1. 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 by CIRC-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
      2. Scenario
        Given overdueMinutes (from called process created by CIRC-548 (Calculate intervals between due-date and returned/renewed-date) for item
        When overdueMinutes > 0
        Then count item as overdue recall
      3. 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

      1. 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 by CIRC-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.)
      2. Scenario
        Given overdueMinutes (from called process created by CIRC-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)
      3. 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

      Alexander Kurash
      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

              Activity

                People

                Assignee:
                oleksandrkurash Alexander Kurash
                Reporter:
                OleksandrVidinieiev Oleksandr Vidinieiev
                Tester Assignee:
                Holly Mistlebauer Holly Mistlebauer
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases