Implement automatic item blocks

Description

Purpose: To block patron from checking out more items than allowed by institution. The institution may have limits specified by patron group and loan type, patron group and material type, patron group, loan type and material type or loan type and material type. These loan limits are set in the Item Limit field of the Loan Policy. When an item is scanned at checkout, the Loan Policy is checked to see what the Item Limit is. If the item being checked out causes the patron to exceed the Item Limit, the patron will not be allowed to check out the item and an error modal will appear.

Important Note: Item limits by patron group are taken care of by Automated Patron Plocks (see UXPROD-82).

Inputs:
Circulation Rule
Loan Policy (to get Item Limit)
Item Record for Open Loans (see attachment Open-Loans.JPG to see how to access Item Details from Open Loans; see attachment Item-Details.JPG to see the contents of the Item Record)

  • Material Type

  • Loan Type

    • If Temporary Loantype is populated, use Temporary Loantype

    • If Temporary Loantype is not populated, use Permanent Loantype

Scenarios:

1. Scenario
Given item being checked out
When Circulation Rule found (this is already coded in the process)
Then check of Loan Policy for Item Limit

2. Scenario
Given check Loan Policy for Item Limit
When Circulation Rule includes Patron Group ("g"), Material Type ("m") and Loan Type ("t")
Then total up items patron has checked out for that Material Type and Loan Type

  • If total = or > Item Limit in Limit Policy

    • Display "Item not check out" modal (see attached mock-up Item-not-checked-out-modal.jpg), replacing "<insert appropriate error message here>" with "Patron has reached maximum item limit of <Maximum Number Allowed> items for combination of patron group, material type and loan type"

    • Do not allow item to be checked out

  • Else

    • Allow item to be checked out

3. Scenario

Given check Loan Policy for Item Limit
When Circulation Rule includes Patron Group ("g") and Material Type ("m"), but not Loan Type ("t")
Then total up items patron has checked out for that Material Type

  • If total = or > Item Limit in Limit Policy

    • Display "Item not check out" modal (see attached mock-up Item-not-checked-out-modal.jpg), replacing "<insert appropriate error message here>" with "Patron has reached maximum item limit of <Maximum Number Allowed> items for combination of patron group and material type"

    • Do not allow item to be checked out

  • Else

    • Allow item to be checked out

4. Scenario

Given check Loan Policy for Item Limit
When Circulation Rule includes Patron Group ("g") and Loan Type ("t"), but not Material Type ("m")
Then total up items patron has checked out for that Loan Type

  • If total = or > Item Limit in Limit Policy

    • Display "Item not check out" modal (see attached mock-up Item-not-checked-out-modal.jpg), replacing "<insert appropriate error message here>" with "Patron has reached maximum item limit of <Maximum Number Allowed> items for combination of patron group and loan type"

    • Do not allow item to be checked out

  • Else

    • Allow item to be checked out

5. Scenario

Given check Loan Policy for Item Limit
When Circulation Rule includes both Material Type ("m") and Loan Type ("t")
Then total up items patron has checked out for that Material Type and Loan Type

  • If total = or > Item Limit in Limit Policy

    • Display "Item not check out" modal (see attached mock-up Item-not-checked-out-modal.jpg), replacing "<insert appropriate error message here>" with "Patron has reached maximum item limit of <Maximum Number Allowed> items for combination of material type and loan type"

    • Do not allow item to be checked out

  • Else

    • Allow item to be checked out

6. Scenario

Given check Loan Policy for Item Limit
When Circulation Rule includes Material Type ("m") but not Loan Type ("t")
Then total up items patron has checked out for that Material Type

  • If total = or > Item Limit in Limit Policy

    • Display "Item not check out" modal (see attached mock-up Item-not-checked-out-modal.jpg), replacing "<insert appropriate error message here>" with "Patron has reached maximum item limit of <Maximum Number Allowed> items for material type"

    • Do not allow item to be checked out

  • Else

    • Allow item to be checked out

7. Scenario

Given check Loan Policy for Item Limit
When Circulation Rule includes Loan Type ("t") but not Material Type ("m")
Then total up items patron has checked out for that Loan Type

  • If total = or > Item Limit in Limit Policy

    • Display "Item not check out" modal (see attached mock-up Item-not-checked-out-modal.jpg), replacing "<insert appropriate error message here>" with "Patron has reached maximum item limit of <Maximum Number Allowed> items for loan type"

    • Do not allow item to be checked out

  • Else

    • Allow item to be checked out

8. Scenario

Given check Loan Policy for Item Limit
When Circulation Rule includes Patron Group ("g") but not Loan Type ("t") or Material Type ("m")
Then
Then

  • Ignore Item Limit in Limit Policy (patron group only blocks are handled via Automated Patron Blocks)

  • Allow item to be checked out

9. Scenario
Given check Loan Policy for Item Limit
When Circulation Rule does not include Patron Group ("g") or Loan Type ("t") or Material Type ("m")
Then

  • Ignore Item Limit in Limit Policy (patron group only blocks are handled via Automated Patron Blocks)

  • Allow item to be checked out

10. Given "Item not checked out" modal
When Close button pressed
Then close modal and leave user at Checkout page

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Description:

At the point when the effective Circulation Rule is found, you will need to confirm that the item being checked out will not cause the patron to go over the maximum number of items they are allowed to have checked out based on the new Item Limit field of the Loan Policy.

An institution is able to set up Circulation Rules with many combinations of variables (see attachment Circulation-Rules.JPG). We care about 3:

  • Patron group ("g")

  • Material type ("m")

  • Loan type ("l")

A Circulation Rule may have none, one, two, or all three of these variables. This means we have to be prepared to handle these these combinations:

  • Patron group, Material type, Loan type

  • Patron group, Material type

  • Patron group, Loan type

  • Material type, Loan type

  • Material type

  • Loan type

  • Loan type

  • Patron group (this is not allowed for setting an Automated Item Block--this is handled via an Automated Patron Block)

  • None (this is not allowed for setting an Automated Item Block--this is handled via an Automated Patron Block)

The variables included in the Circulation Rule impact two parts of the item block process:
1. The open loans that are included in the total count

  • Given that the patron is only in one Patron Group, we can ignore that variable

  • If both Material Type ("m") and Loan Type ("t") are included in the Circulation Rule, we need to count only those open loans that have the same Material Type and Loan Type

  • If only Material Type ("m") is included in the Circulation Rule, we need to count only those open loans that have the same Material Type

  • If only Loan Type ("t") is included in the Circulation Rule, we need to count only those open loans that have the same Item Type
    2. The error message that is displayed

  • The user needs to know exactly why the patron cannot check out the item, so the error message needs to be specific to the Circulation Rule

  • The seven different error messages that can be used are show in attachment Item-not-check-out-modal.jpg and below

The total count of open loans that meet the same criteria as the Circulation Rule (see #1 above) is compared with the Item Limit value in the Loan Policy associated with the Circulation Rule in effect.

If the total count is = or > than Item Limit the patron is not allowed to check out the book. Instead, the "Item not checked out" modal is displayed with the appropriate error message (as shown in attachment Item-not-checked-out-modal.jpg).

Please see Holly for more information! Thanks!

Environment

None

Potential Workaround

None

Attachments

7

Checklist

hide

TestRail: Results

Activity

Show:

Khalilah GambrellJanuary 27, 2020 at 2:21 PM

Validation will be done with

Khalilah GambrellJanuary 9, 2020 at 12:04 PM

, what should we do with this story? Should this be used for to verify implementation is correct?

Tetyana AfanasyevaDecember 18, 2019 at 2:50 PM

Is Blocked by UICHOUT-580 now. No implementation is needed in scope of this story. Should be validated after UICHOUT-580 is fixed.

Kostyantyn KhodarevNovember 25, 2019 at 2:06 PM

Seems to me yes, was blocked by UI limit implementation which is In Review now

Khalilah GambrellNovember 25, 2019 at 1:52 PM

and , can we unblock this story?

Done

Details

Assignee

Reporter

Tester Assignee

Priority

Sprint

Development Team

Vega

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created August 21, 2019 at 4:47 PM
Updated July 23, 2020 at 8:29 PM
Resolved January 27, 2020 at 2:21 PM
TestRail: Cases
TestRail: Runs