Bug 14634: Warns when placing hold on record with no items
authorAleisha <aleishaamohia@hotmail.com>
Mon, 3 Aug 2015 02:23:29 +0000 (02:23 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Thu, 27 Aug 2015 16:21:16 +0000 (13:21 -0300)
To test:

1) Create a new record in Cataloguing
2) When done, instead of adding an item to the record, click on the Holds tab in the left nav
3) Notice warns
4) Apply patch and refresh page
5) Click on Holds tab again
6) Notice warns are gone and page still works

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Warns disappear; note that the display of the error message is still ugly.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

reserve/request.pl

index 06dc6bf..0d82f1c 100755 (executable)
@@ -201,6 +201,7 @@ foreach my $biblionumber (@biblionumbers) {
     my $dat = GetBiblioData($biblionumber);
 
     my $canReserve = CanBookBeReserved( $borrowerinfo->{borrowernumber}, $biblionumber );
+    $canReserve //= '';
     if ( $canReserve eq 'OK' ) {
 
         #All is OK and we can continue