Skip to content

Instantly share code, notes, and snippets.

@gregblake
Last active October 14, 2021 18:25
Show Gist options
  • Save gregblake/bb16694a24abc02bad00cc1631dfb8c3 to your computer and use it in GitHub Desktop.
Save gregblake/bb16694a24abc02bad00cc1631dfb8c3 to your computer and use it in GitHub Desktop.
Circulate: Edge Cases to Handle for Issue #672

Edge cases:

With and without holds:

  • No filter, no category ✅
  • "available" filter, no category, with and without a hold ✅
  • No filter, with category: should show items with loan or a hold. ✅
  • "available" filter, with category ✅

With and without loans, when it's an item with a borrow policy:

  • No filter, no category ✅
  • "available" filter, no category, with and without a loan ✅
  • No filter, with category: should show items with loan or a hold. ✅
  • "available" filter, with category ✅

With and without loans, when it's an item WITHOUT a borrow policy (i.e. infinite items):

  • No filter, no category, item should be visible ✅
  • "available" filter, no category, with and without a loan, item should be visible ✅
  • No filter, with category: should show items with loan or a hold, item should be visible ✅
  • "available" filter, with category, item should be visible ✅

In other words

With "available" filter, and it's not uniquely numbered: don't show the items that have a hold or a loan. With "available" filter, and it's not uniquely numbered, then always show the items, even if there's a hold or a loan.

@gregblake
Copy link
Author

gregblake commented Oct 14, 2021

Uncounted items:
  * Always show:

Counted items:
  Don't show the item on the inventory list when:
    * The item is not active (i.e. if the status is pending/maintenance/retired).
    * The category doesn't match the category the user is currently viewing.
    * There is a hold on the item.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment