Create and retrieve a Title Level Request for an instance with multiple copies but none available
Description
Environment
Potential Workaround
clones
defines
has to be done before
Checklist
hideTestRail: Results
Activity

Martin Tran June 7, 2019 at 1:08 PM
if there is one or more available items, use the logic in , and only if there are no available items, use the size of the queue to determine priority?
Is that a sensible understanding?
That is my understanding,

Marc Johnson June 7, 2019 at 11:54 AM
if there is a request queue, check the number of requests, pick the one with shortest queue. If there is a tie, check the soonest due date.
Does this criteria only apply when there are no available items?
Or to put it a different way, if there is one or more available items, use the logic in , and only if there are no available items, use the size of the queue to determine priority?
Is that a sensible understanding?
What does due date
mean in this context, is it the due date of the open loan for the item
(if there is one, as not all unavailable items will have a loan)?

Cate Boerema April 12, 2019 at 2:18 PMEdited
Hi , another factor that will influence which item is selected is whether the patron-item-request type combo is permitted by request policies. I guess that is covered by "Then a request following implemented policies can be placed on an item that will first become available". Will you have a story somewhere for what should happen if requesting isn't allowed for any of the available items? I assume some kind of messaging should display to the patron.

Magda Zacharska April 11, 2019 at 2:42 PM
we were discussing more advanced approach to analyzing the request queue but the fact is that when creating the request we cannot really determine when the copy will become available. The item with later due date might be returned earlier, or the one that was scheduled to be due earlier might never be returned. Ideally we would like to be able assign the item to the request once it will be come available but this approach is outside the scope of this version so we decided for the simplest approach for now.
If the queues are the same sieze and the due date of the loan is the same we will apply the same behavior as described in , the closed location takes precedence, otherwise either item will be selected. If one request queue is empty it is assumed that it is smaller than the other queue

Marc Johnson April 10, 2019 at 3:42 PMEdited
To aid the developer implementing this and the testers, could the following be expanded into scenarios
if there is a request queue, check the number of requests, pick the one with shortest queue. If there is a tie, check the soonest due date.
For example: one of two queues are empty; one queue is smaller than the other; the queues are the same size
What should happen if the queues are the same size and the due date of the loan is the same?
Details
Assignee
Martin TranMartin TranReporter
Magda ZacharskaMagda ZacharskaPriority
P3Story Points
3Sprint
NoneFix versions
TestRail: Cases
Open TestRail: CasesTestRail: Runs
Open TestRail: Runs
Details
Details
Assignee

Reporter

Purpose
Current implementation allows requests on the item level when the requests are often being placed on a specific title (FOLIO's instance) level without being concerned about specific copy (FOLIO's item) fulfilling the request. This user story covers scenarios when a user selects a title that has multiple available copies.
Statement
As a library patron I would like to create a request for a given title (instance) so that if all copies are checked out or requested by other patron my request will be placed on the first available copy.
Scenario 1
Given a patron is searching for a resource by its title
When all copies of the publication are currently checked out
Then a request following implemented policies can be placed on an item that will first become available
Scenario 2
Given a patron is searching for a resource by its title
When all copies of the publication are currently checked out and there is a request queue on each item
Then a request can be placed on an item with a shortest queue
If all items have queues with the same length, the first item will be picked.
If the request for some reason fails on a given item with the shortest queue, the next item will be picked.
If the request for some reason fails on all items - errors should be returned stating that the request couldn't be created.