Got this one under 19.11 on line 521 Looks like someone tried to cancel an already cancelled hold from the opac (in the user menu). Trivial fix.
Created attachment 122518 [details] [review] Bug 28644: Fix calling borrowernumber on undefined value If the hold is not found (e.g. already cancelled), we should return earlier without crashing: Can't call method "borrowernumber" on an undefined value at /usr/share/koha/C4/Reserves.pm line 521 (Note: line number from 19.11) Test plan: Run t/db_dependent/Reserves.t Add a hold, go to user menu with holds in OPAC. At the same time, cancel this hold from staff. Now click the Cancel in OPAC. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Self signoff; too trivial to wait for.
Created attachment 122735 [details] [review] Bug 28644: Fix calling borrowernumber on undefined value If the hold is not found (e.g. already cancelled), we should return earlier without crashing: Can't call method "borrowernumber" on an undefined value at /usr/share/koha/C4/Reserves.pm line 521 (Note: line number from 19.11) Test plan: Run t/db_dependent/Reserves.t Add a hold, go to user menu with holds in OPAC. At the same time, cancel this hold from staff. Now click the Cancel in OPAC. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Pushed to master for 21.11, thanks to everybody involved!
Pushed to 21.05.x for 21.05.02
Pushed to 20.11.x for 20.11.09
Backported: Pushed to 20.05.x branch for 20.05.15
Should this be backported to 19.11.x for 19.11.21? Or if it contains string changes, backported to 19.11.22? As we are currently in a string freeze.
Should this be backported to 19.11.x for 19.11.22?
Created attachment 124571 [details] [review] Bug 28644: [19.11.x] Fix calling borrowernumber on undefined value If the hold is not found (e.g. already cancelled), we should return earlier without crashing: Can't call method "borrowernumber" on an undefined value at /usr/share/koha/C4/Reserves.pm line 521 (Note: line number from 19.11) Test plan: Run t/db_dependent/Reserves.t Add a hold, go to user menu with holds in OPAC. At the same time, cancel this hold from staff. Now click the Cancel in OPAC. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Backported to 19.11.x for 19.11.22