Bugzilla – Attachment 58642 Details for
Bug 17736
Move GetReservesFromBiblionumber to Koha::Biblio->holds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17736: [QA Follow-up] Crashes in basket.pl and parcel.pl
Bug-17736-QA-Follow-up-Crashes-in-basketpl-and-par.patch (text/plain), 2.46 KB, created by
Marcel de Rooy
on 2017-01-06 12:55:34 UTC
(
hide
)
Description:
Bug 17736: [QA Follow-up] Crashes in basket.pl and parcel.pl
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-01-06 12:55:34 UTC
Size:
2.46 KB
patch
obsolete
>From 3757b1669a9ed18f04a84da8cf31b800107c7268 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 6 Jan 2017 12:21:56 +0100 >Subject: [PATCH] Bug 17736: [QA Follow-up] Crashes in basket.pl and parcel.pl >Content-Type: text/plain; charset=utf-8 > >Crash in basket.pl: >Can't call method "holds" on an undefined value at /usr/share/koha/masterclone/acqui/basket.pl line 466. >Comes from a biblionumber == NULL in aqorders where I cancelled the order and deleted the biblio. > >Crash in parcel.pl: >Can't call method "holds" on an undefined value at /usr/share/koha/masterclone/acqui/parcel.pl line 246. >Similar fix. > >Trivial fixes indeed. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > acqui/basket.pl | 2 +- > acqui/parcel.pl | 6 +++--- > 2 files changed, 4 insertions(+), 4 deletions(-) > >diff --git a/acqui/basket.pl b/acqui/basket.pl >index 31b96bb..db24721 100755 >--- a/acqui/basket.pl >+++ b/acqui/basket.pl >@@ -463,7 +463,7 @@ sub get_order_infos { > my $ordernumber = $order->{'ordernumber'}; > my @subscriptions = GetSubscriptionsId ($biblionumber); > my $itemcount = GetItemsCount($biblionumber); >- my $holds_count = $biblio->holds->count; >+ my $holds_count = $biblio ? $biblio->holds->count : 0; > my @items = GetItemnumbersFromOrder( $ordernumber ); > my $itemholds; > foreach my $item (@items){ >diff --git a/acqui/parcel.pl b/acqui/parcel.pl >index 97943a3..3bd586c 100755 >--- a/acqui/parcel.pl >+++ b/acqui/parcel.pl >@@ -141,11 +141,11 @@ for my $order ( @orders ) { > $line{holds} = 0; > my @itemnumbers = GetItemnumbersFromOrder( $order->{ordernumber} ); > my $biblio = Koha::Biblios->find( $line{biblionumber} ); >- $line{holds} = $biblio->current_holds->search( >+ $line{holds} = $biblio ? $biblio->current_holds->search( > { > itemnumber => { -in => \@itemnumbers }, > } >- )->count; >+ )->count : 0; > $line{budget} = GetBudgetByOrderNumber( $line{ordernumber} ); > > $line{tax_value} = $line{tax_value_on_receiving}; >@@ -243,7 +243,7 @@ unless( defined $invoice->{closedate} ) { > my $ordernumber = $line{'ordernumber'}; > my @subscriptions = GetSubscriptionsId ($biblionumber); > my $itemcount = GetItemsCount($biblionumber); >- my $holds_count = $biblio->holds->count; >+ my $holds_count = $biblio ? $biblio->holds->count : 0; > my @items = GetItemnumbersFromOrder( $ordernumber ); > my $itemholds; > foreach my $item (@items){ >-- >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 17736
:
58015
|
58016
|
58017
|
58056
|
58057
|
58106
|
58107
|
58108
|
58628
|
58629
|
58630
|
58631
|
58632
|
58633
|
58634
|
58635
|
58636
|
58637
|
58638
|
58639
|
58640
|
58641
|
58642
|
58643
|
58644
|
58645
|
59846
|
59847
|
59848
|
59849
|
59850
|
59851
|
59852
|
59853
|
59854
|
59855
|
59859
|
59860
|
61406
|
61407
|
61408
|
61409
|
61410
|
61411
|
61412
|
61413
|
61414
|
61415
|
61416