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)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 9 May 2023 14:46:54 +0000 (11:46 -0300)
commitee318d20f5506e9b4c955633f0e9eddc9c171f29
tree658efe8d494695fedad1f9d3147e441b33196c6b
parent1e5c55176ef4d70b1535040a576ab13d4561c53f
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>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
opac/opac-reserve.pl