Bug 17453 - Inter-site holds improvement
Summary: Inter-site holds improvement
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low new feature (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-15 09:16 UTC by Jonathan Druart
Modified: 2017-05-17 22:42 UTC (History)
10 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: ---
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:
Without this feature users could reserve items and choose any library as a pick up location, but there was no mechanism to prevent users from reserving items that were available on the shelf at any given location from reserving the item at the same location, essentially creating a Fetch and Collect scenario. This had an impact on staff workloads as they had to process reservations and check shelves for items that students could have collected from the open library shelves. This enhancement decreases the impact on staff workload by making it possible to prevent users from requesting items for pick up at a library where the item is currently available.


Attachments
Bug 17453: Add pref OPACHoldsIfAvailableAtPickup (10.60 KB, patch)
2016-10-18 13:56 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 17453: Inter-site holds improvement (6.94 KB, patch)
2016-10-18 13:56 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 17453: Add exceptions (13.00 KB, patch)
2016-10-24 12:46 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 17453: Allow pickup at a library where all items are checked out (2.00 KB, patch)
2016-10-31 11:18 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 17453: Add pref OPACHoldsIfAvailableAtPickup (10.61 KB, patch)
2016-10-31 14:45 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 17453: Inter-site holds improvement (6.94 KB, patch)
2016-10-31 14:45 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 17453: Add exceptions (13.00 KB, patch)
2016-10-31 14:45 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 17453: Allow pickup at a library where all items are checked out (2.07 KB, patch)
2016-10-31 14:45 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 17453: Add exceptions (13.05 KB, patch)
2017-02-06 08:24 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 17453: Allow pickup at a library where all items are checked out (2.06 KB, patch)
2017-02-06 08:24 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 17453: Add a visible notification to patron to explain why the hold locations are disabled (3.20 KB, patch)
2017-02-09 17:48 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 17453: Take into account items that are lost or damaged (1.30 KB, patch)
2017-02-10 07:56 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 17453: Add pref OPACHoldsIfAvailableAtPickup (10.71 KB, patch)
2017-02-15 20:22 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 17453: Inter-site holds improvement (7.05 KB, patch)
2017-02-15 20:22 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 17453: Add exceptions (13.16 KB, patch)
2017-02-15 20:22 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 17453: Allow pickup at a library where all items are checked out (2.17 KB, patch)
2017-02-15 20:22 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 17453: Add a visible notification to patron to explain why the hold locations are disabled (3.30 KB, patch)
2017-02-15 20:22 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 17453: Take into account items that are lost or damaged (1.41 KB, patch)
2017-02-15 20:22 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 17453 (QA Followup) (1.63 KB, patch)
2017-02-15 20:22 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2016-10-15 09:16:22 UTC

    
Comment 1 Jonathan Druart 2016-10-18 13:56:01 UTC
Created attachment 56623 [details] [review]
Bug 17453: Add pref OPACHoldsIfAvailableAtPickup
Comment 2 Jonathan Druart 2016-10-18 13:56:04 UTC
Created attachment 56624 [details] [review]
Bug 17453: Inter-site holds improvement

At the moment users can reserve items and choose any library as a pick up
location, but there is no mechanism to prevent users from reserving items that
are available on the shelf at any given location from reserving the item at the
same location, essentially creating a Fetch and Collect scenario.
This has an impact on staff workloads as they are having to process reservations
and check shelves for items that students can already come and collect from the
open library shelves.
The aim of this enhancement is to decrease the impact on staff workload there
should be a restriction in place that prevents users from requesting items for
collection at a library where the item is currently available.

Implementation:
We first tried to add a new circulation rule adding a 4th
“NotIfAvailableAtPickupLibrary” option to "On shelf holds allowed".
That would make the development more flexible.
But in that case we quickly faced non-trivial problematics:
Let's say you have 3 items I1, I2 and I3. The first one has onshelfholds
set to Yes and 2 others has it set to “NotIfAvailableAtPickupLibrary”.
What would be the expected behavior if a hold is placed at biblio level?
And if a hold is placed at item level for I1?
This second point could be answered by reworking the interface to move
the libraries dropdown list elsewhere (1 list per item) or by adding a
lot of JS code to handle the different situation. But it would be
much more complicated to implement.
So finally I moved back to the simple approach and added a new pref to
handle the behavior globally.

Test plan:
0/ Switch off OPACHoldsIfAvailableAtPickup
1/ Let's say you have 3 libraries L1, L2, L3, create 2 items owned by L1
and L2
2/ Place a biblio level hold. You should only be able to pick it up at
L3
2/ Place a item level hold. You should only be able to pick it up at
L3
3/ Create a third items owned by L3
4/ Now you should not be able to place a hold on this record anymore

Sponsored-by: University of the Arts London
Comment 3 Jonathan Druart 2016-10-18 16:50:25 UTC
We can imagine another syspref to list the patron categories not affected by this behaviour.
Comment 4 Jonathan Druart 2016-10-18 17:14:30 UTC
(In reply to Jonathan Druart from comment #3)
> We can imagine another syspref to list the patron categories not affected by
> this behaviour.

Or a flag in the (patron) categories table
Comment 5 Jonathan Druart 2016-10-24 12:46:26 UTC
Created attachment 56762 [details] [review]
Bug 17453: Add exceptions

This patch adds the ability to define patron categories not affected by
the behavior of OPACHoldsIfAvailableAtPickup.
The new pref OPACHoldsIfAvailableAtPickupExceptions get a list of patron
categories (separated by pipes |).
Comment 6 Jonathan Druart 2016-10-31 11:18:53 UTC
Created attachment 56994 [details] [review]
Bug 17453: Allow pickup at a library where all items are checked out

If all items are checked out then it should be possible to select the pickup
library for that record.
Comment 7 PTFS Europe Sandboxes 2016-10-31 14:44:29 UTC
Patch tested with a sandbox, by Janet McGowan <janet.mcgowan@ptfs-europe.com>
Comment 8 PTFS Europe Sandboxes 2016-10-31 14:45:13 UTC
Created attachment 57002 [details] [review]
Bug 17453: Add pref OPACHoldsIfAvailableAtPickup
Comment 9 PTFS Europe Sandboxes 2016-10-31 14:45:16 UTC
Created attachment 57003 [details] [review]
Bug 17453: Inter-site holds improvement

At the moment users can reserve items and choose any library as a pick up
location, but there is no mechanism to prevent users from reserving items that
are available on the shelf at any given location from reserving the item at the
same location, essentially creating a Fetch and Collect scenario.
This has an impact on staff workloads as they are having to process reservations
and check shelves for items that students can already come and collect from the
open library shelves.
The aim of this enhancement is to decrease the impact on staff workload there
should be a restriction in place that prevents users from requesting items for
collection at a library where the item is currently available.

Implementation:
We first tried to add a new circulation rule adding a 4th
“NotIfAvailableAtPickupLibrary” option to "On shelf holds allowed".
That would make the development more flexible.
But in that case we quickly faced non-trivial problematics:
Let's say you have 3 items I1, I2 and I3. The first one has onshelfholds
set to Yes and 2 others has it set to “NotIfAvailableAtPickupLibrary”.
What would be the expected behavior if a hold is placed at biblio level?
And if a hold is placed at item level for I1?
This second point could be answered by reworking the interface to move
the libraries dropdown list elsewhere (1 list per item) or by adding a
lot of JS code to handle the different situation. But it would be
much more complicated to implement.
So finally I moved back to the simple approach and added a new pref to
handle the behavior globally.

Test plan:
0/ Switch off OPACHoldsIfAvailableAtPickup
1/ Let's say you have 3 libraries L1, L2, L3, create 2 items owned by L1
and L2
2/ Place a biblio level hold. You should only be able to pick it up at
L3
2/ Place a item level hold. You should only be able to pick it up at
L3
3/ Create a third items owned by L3
4/ Now you should not be able to place a hold on this record anymore

Sponsored-by: University of the Arts London
Comment 10 PTFS Europe Sandboxes 2016-10-31 14:45:19 UTC
Created attachment 57004 [details] [review]
Bug 17453: Add exceptions

This patch adds the ability to define patron categories not affected by
the behavior of OPACHoldsIfAvailableAtPickup.
The new pref OPACHoldsIfAvailableAtPickupExceptions get a list of patron
categories (separated by pipes |).
Comment 11 PTFS Europe Sandboxes 2016-10-31 14:45:22 UTC
Created attachment 57005 [details] [review]
Bug 17453: Allow pickup at a library where all items are checked out

If all items are checked out then it should be possible to select the pickup
library for that record.

Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com>
Comment 12 Nick Clemens 2017-02-03 11:58:10 UTC
Patch doesn't apply, I also wonder about last patch:
Allow pickup at a library where all items are checked out

It only checks if items are checked out, but what about case of items waiting for pickup or damaged/lost?
Comment 13 Jonathan Druart 2017-02-06 08:24:31 UTC
Created attachment 59915 [details] [review]
Bug 17453: Add exceptions

This patch adds the ability to define patron categories not affected by
the behavior of OPACHoldsIfAvailableAtPickup.
The new pref OPACHoldsIfAvailableAtPickupExceptions get a list of patron
categories (separated by pipes |).
Comment 14 Jonathan Druart 2017-02-06 08:24:35 UTC
Created attachment 59916 [details] [review]
Bug 17453: Allow pickup at a library where all items are checked out

If all items are checked out then it should be possible to select the pickup
library for that record.

Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com>
Comment 15 Jonathan Druart 2017-02-06 08:28:58 UTC
(In reply to Nick Clemens from comment #12)
> Patch doesn't apply, I also wonder about last patch:
> Allow pickup at a library where all items are checked out
> 
> It only checks if items are checked out, but what about case of items
> waiting for pickup or damaged/lost?

Hum yes you may be right. But that sounds like a very specific situation and that would make the code much complicated.
I'd suggest to go first with these patches and improve them later if it is really needed.
If you think it has to be handled, I can try and provide a patch on this bug report.
Comment 16 Nick Clemens 2017-02-09 16:52:03 UTC
Chatted with Claire in IRD, I think this needs some sort of visible notification to patron to explain why the hold locations are disabled (the hover notification is appreciated but not sufficient I think)

<kidclamp> Would you agree to some sort of notification that this pref is active to explain why the location is disabled?
<LibraryClaire> my original plan said for there to be a message that says item is availabel for collection at that library 
<LibraryClaire> or similar when they go to place the reservation
<kidclamp> "Note: Library policy does not allow hold/pickup of an item avialable locally. Please come to the library to retrieve these items"
<LibraryClaire> along those lines
<kidclamp> yeah or what you said, okay I will post that for Joubu
Comment 17 Jonathan Druart 2017-02-09 17:48:19 UTC
Created attachment 60093 [details] [review]
Bug 17453: Add a visible notification to patron to explain why the hold locations are disabled
Comment 18 Claire Gravely 2017-02-09 18:00:37 UTC
(In reply to Jonathan Druart from comment #15)
> (In reply to Nick Clemens from comment #12)
> > Patch doesn't apply, I also wonder about last patch:
> > Allow pickup at a library where all items are checked out
> > 
> > It only checks if items are checked out, but what about case of items
> > waiting for pickup or damaged/lost?
> 
> Hum yes you may be right. But that sounds like a very specific situation and
> that would make the code much complicated.
> I'd suggest to go first with these patches and improve them later if it is
> really needed.
> If you think it has to be handled, I can try and provide a patch on this bug
> report.

I would agree with Nick that items that are on hold for someone or otherwise marked as unavailable ( such as lost) should be taken into consideration. 

No items should be "available" at the pick up location in order for it to qualify as a pick up location perhaps?
Comment 19 Jonathan Druart 2017-02-10 07:56:11 UTC
Created attachment 60102 [details] [review]
Bug 17453: Take into account items that are lost or damaged

If all the items are either lost, damaged or checked out, then pickup
should be allowed.
Comment 20 Nick Clemens 2017-02-15 20:22:02 UTC
Created attachment 60285 [details] [review]
Bug 17453: Add pref OPACHoldsIfAvailableAtPickup

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

https://bugs.koha-community.org/show_bug.cgi?id=14753
Comment 21 Nick Clemens 2017-02-15 20:22:08 UTC
Created attachment 60286 [details] [review]
Bug 17453: Inter-site holds improvement

At the moment users can reserve items and choose any library as a pick up
location, but there is no mechanism to prevent users from reserving items that
are available on the shelf at any given location from reserving the item at the
same location, essentially creating a Fetch and Collect scenario.
This has an impact on staff workloads as they are having to process reservations
and check shelves for items that students can already come and collect from the
open library shelves.
The aim of this enhancement is to decrease the impact on staff workload there
should be a restriction in place that prevents users from requesting items for
collection at a library where the item is currently available.

Implementation:
We first tried to add a new circulation rule adding a 4th
“NotIfAvailableAtPickupLibrary” option to "On shelf holds allowed".
That would make the development more flexible.
But in that case we quickly faced non-trivial problematics:
Let's say you have 3 items I1, I2 and I3. The first one has onshelfholds
set to Yes and 2 others has it set to “NotIfAvailableAtPickupLibrary”.
What would be the expected behavior if a hold is placed at biblio level?
And if a hold is placed at item level for I1?
This second point could be answered by reworking the interface to move
the libraries dropdown list elsewhere (1 list per item) or by adding a
lot of JS code to handle the different situation. But it would be
much more complicated to implement.
So finally I moved back to the simple approach and added a new pref to
handle the behavior globally.

Test plan:
0/ Switch off OPACHoldsIfAvailableAtPickup
1/ Let's say you have 3 libraries L1, L2, L3, create 2 items owned by L1
and L2
2/ Place a biblio level hold. You should only be able to pick it up at
L3
2/ Place a item level hold. You should only be able to pick it up at
L3
3/ Create a third items owned by L3
4/ Now you should not be able to place a hold on this record anymore

Sponsored-by: University of the Arts London

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

https://bugs.koha-community.org/show_bug.cgi?id=14753
Comment 22 Nick Clemens 2017-02-15 20:22:13 UTC
Created attachment 60287 [details] [review]
Bug 17453: Add exceptions

This patch adds the ability to define patron categories not affected by
the behavior of OPACHoldsIfAvailableAtPickup.
The new pref OPACHoldsIfAvailableAtPickupExceptions get a list of patron
categories (separated by pipes |).

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

https://bugs.koha-community.org/show_bug.cgi?id=14753
Comment 23 Nick Clemens 2017-02-15 20:22:18 UTC
Created attachment 60288 [details] [review]
Bug 17453: Allow pickup at a library where all items are checked out

If all items are checked out then it should be possible to select the pickup
library for that record.

Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

https://bugs.koha-community.org/show_bug.cgi?id=14753
Comment 24 Nick Clemens 2017-02-15 20:22:22 UTC
Created attachment 60289 [details] [review]
Bug 17453: Add a visible notification to patron to explain why the hold locations are disabled

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

https://bugs.koha-community.org/show_bug.cgi?id=14753
Comment 25 Nick Clemens 2017-02-15 20:22:26 UTC
Created attachment 60290 [details] [review]
Bug 17453: Take into account items that are lost or damaged

If all the items are either lost, damaged or checked out, then pickup
should be allowed.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

https://bugs.koha-community.org/show_bug.cgi?id=14753
Comment 26 Nick Clemens 2017-02-15 20:22:31 UTC
Created attachment 60291 [details] [review]
Bug 17453 (QA Followup)

Add line break before note message

https://bugs.koha-community.org/show_bug.cgi?id=14753
Comment 27 Nick Clemens 2017-02-15 20:24:08 UTC
I am not 100% sure on the wording of the message, but I don't have a better suggestion and feature works as advertised
Comment 28 Nick Clemens 2017-02-16 00:05:10 UTC
And forgot to mention - in the atomic update the options and explanation columns are switched - needs to be corrected when pushed
Comment 29 Kyle M Hall 2017-02-17 17:18:48 UTC
Pushed to master for 17.05, thanks Jonathan, Nick!
Comment 30 Katrin Fischer 2017-02-19 20:55:59 UTC
This sounds like something we could highlight in the upcoming release - I know it's something libraries here have wanted for quite a while. 

This won't get ported back to 16.11.x as it is an enhancement.