Bugzilla – Attachment 62514 Details for
Bug 18467
Error calling count on undefined bib in basket.pl if order cancelled and record deleted
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18467 - Error calling count on undefined bib in basket.pl if order cancelled and record deleted
Bug-18467---Error-calling-count-on-undefined-bib-i.patch (text/plain), 1.42 KB, created by
Alex Buckley
on 2017-04-21 04:08:57 UTC
(
hide
)
Description:
Bug 18467 - Error calling count on undefined bib in basket.pl if order cancelled and record deleted
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2017-04-21 04:08:57 UTC
Size:
1.42 KB
patch
obsolete
>From a084594357d2f262651b82236d023ea3651c8bb3 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 20 Apr 2017 21:11:22 -0400 >Subject: [PATCH] Bug 18467 - Error calling count on undefined bib in basket.pl > if order cancelled and record deleted > >To test: >1 - Create a basket >2 - Order a bib >3 - Cancel order and delete record >4 - You cannot view basket >5 - Apply patch >6 - View basket >7 - There should not be an error >r calling count on undefined bib in basket.pl if order cancelled and >record deleted > >Followed test plan and it works as specified >Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> >--- > acqui/basket.pl | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/acqui/basket.pl b/acqui/basket.pl >index e556be2..d3af492 100755 >--- a/acqui/basket.pl >+++ b/acqui/basket.pl >@@ -467,8 +467,8 @@ sub get_order_infos { > my $countbiblio = CountBiblioInOrders($biblionumber); > my $ordernumber = $order->{'ordernumber'}; > my @subscriptions = GetSubscriptionsId ($biblionumber); >- my $itemcount = $biblio->items->count; >- my $holds_count = $biblio->holds->count; >+ my $itemcount = ( defined $biblio ) ? $biblio->items->count : 0; >+ my $holds_count = ( defined $biblio ) ? $biblio->holds->count : 0; > my @items = GetItemnumbersFromOrder( $ordernumber ); > my $itemholds = $biblio ? $biblio->holds->search({ itemnumber => { -in => \@items } })->count : 0; > >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18467
:
62511
|
62514
|
62537
|
62570
|
62571
|
62654