Bug 33302: Send and display errors when a hold cannot be placed on the OPAC
authorNick Clemens <nick@bywatersolutions.com>
Tue, 28 Mar 2023 11:31:42 +0000 (11:31 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Thu, 15 Jun 2023 16:56:27 +0000 (16:56 +0000)
commit681c31b2d6ec19fa7eebc1f585a89076e0a82371
tree617bc652175bbd64465d8d3935efd95a0b166433
parent50c883eac3916e6aadaa8d0dd3dd3dfb74305a1e
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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ee318d20f5506e9b4c955633f0e9eddc9c171f29)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 28db837abbf781dfd9ad096f070f32771bfac457)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
opac/opac-reserve.pl