A bit much to put in the description, but the problem is about item level holds failing to be placed silently in the OPAC. To test: With the sample data in ktd or sandboxes: 1) Enforce library transfer limits (UseBranchTransferLimits) on itemtypes (BranchTransferLimitsType). 2) In administration > branch transfer rules: disallow transfer from Midway to any other library for item type BK (Books) 3) Search for a record with at least one item in Midway in staff 4) Try to place an item level hold on a Midway item. I used: Intermediate Perl, biblionumber 126 For the Midway item, only Midway will show as possible pickup-location This is correct. 5) Switch to the OPAC 6) Try to place an item level hold there on the Midway item, for pick-up at Centerville. 7) Place a hold on the Midway item for pick-up at any non-Midway location 8) Verify the page saves without error, but the hold was not placed. - The basic issue here is that item specific pickup locations != record-specific pickup locations. In the staff interface we have a separate pull down "allowed pick-up locations" for each item in the list. I think we should implement the same in the OPAC to help the users see what is allowed and what not. And deacticate the pull down on top when an item is selected. But: At least we should give proper feedback that a hold could not be placed because of the pick-up location instead of failing silently!
Created attachment 148813 [details] [review] Bug 33302: Send and display errors when a hold cannot be placed on the OPAC This patch changes opac-reserve.pl to return the error(s) when placing a hold as a pipe delimited list which is then translated to a message for the user To test: 1 - Find a record with items available on the opac 2 - Click 'place hold' and set things up, but do not confirm 3 - In staff client, do something to make hold invalid: - Make item damaged - Make library not a pickup location - Place other holds for patron up to limit - etc. 4 - Confirm hold on OPAC 5 - You are sent to patron's account, hold is not placed 6 - There is little or no message to explain why 7 - Apply patch 8 - Repeat 9 - Now errors are clear
Created attachment 148896 [details] [review] Bug 33302: Send and display errors when a hold cannot be placed on the OPAC This patch changes opac-reserve.pl to return the error(s) when placing a hold as a pipe delimited list which is then translated to a message for the user To test: 1 - Find a record with items available on the opac 2 - Click 'place hold' and set things up, but do not confirm 3 - In staff client, do something to make hold invalid: - Make item damaged - Make library not a pickup location - Place other holds for patron up to limit - etc. 4 - Confirm hold on OPAC 5 - You are sent to patron's account, hold is not placed 6 - There is little or no message to explain why 7 - Apply patch 8 - Repeat 9 - Now errors are clear Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Created attachment 149123 [details] [review] Bug 33302: Send and display errors when a hold cannot be placed on the OPAC This patch changes opac-reserve.pl to return the error(s) when placing a hold as a pipe delimited list which is then translated to a message for the user To test: 1 - Find a record with items available on the opac 2 - Click 'place hold' and set things up, but do not confirm 3 - In staff client, do something to make hold invalid: - Make item damaged - Make library not a pickup location - Place other holds for patron up to limit - etc. 4 - Confirm hold on OPAC 5 - You are sent to patron's account, hold is not placed 6 - There is little or no message to explain why 7 - Apply patch 8 - Repeat 9 - Now errors are clear Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com> Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Nick, this will conflict with bug 30860.
This will need backporting - should it go in first?
(In reply to Katrin Fischer from comment #5) > This will need backporting - should it go in first? Yes, I made it block the other
Created attachment 150667 [details] [review] Bug 33302: Send and display errors when a hold cannot be placed on the OPAC This patch changes opac-reserve.pl to return the error(s) when placing a hold as a pipe delimited list which is then translated to a message for the user To test: 1 - Find a record with items available on the opac 2 - Click 'place hold' and set things up, but do not confirm 3 - In staff client, do something to make hold invalid: - Make item damaged - Make library not a pickup location - Place other holds for patron up to limit - etc. 4 - Confirm hold on OPAC 5 - You are sent to patron's account, hold is not placed 6 - There is little or no message to explain why 7 - Apply patch 8 - Repeat 9 - Now errors are clear Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com> Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 150668 [details] [review] Bug 33302: (QA follow-up) Rephrase errors to be more user friendly These error message will show within the patron account. The goal of this patch is to make them a little more user friendly avoiding 'patron' and 'hold group' terminology :) Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
I tried to make the error messages a little more user friendly - please feel free to drop the patch if you don't like it!
Pushed to master for 23.05. Nice work everyone, thanks!
Nice work everyone! Pushed to stable for 22.11.x
Backported to 22.05.x for upcoming 22.05.14
Not backporting for 21.11.x