Bugzilla – Attachment 82354 Details for
Bug 21842
always test Koha::ItemType in defined
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21842: test Koha::ItemType in defined in patron summary print
Bug-21842-test-KohaItemType-in-defined-in-patron-s.patch (text/plain), 1.59 KB, created by
Fridolin Somers
on 2018-11-15 10:55:05 UTC
(
hide
)
Description:
Bug 21842: test Koha::ItemType in defined in patron summary print
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2018-11-15 10:55:05 UTC
Size:
1.59 KB
patch
obsolete
>From b1e3a82be50bca6151874adf0a552b3b5846b1e6 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Thu, 15 Nov 2018 09:53:13 +0100 >Subject: [PATCH] Bug 21842: test Koha::ItemType in defined in patron summary > print > >Like Bug 19194 calls on $itemtype->value must test the object is defined. >This patch fixes members/summary-print.pl > >Test plan : >1) Define system preference item-level_itypes on "specific item" >2) Define in framework a subfield of items field : mapped on items.itype and not mandatory >3) Create an item without value on this subfield >4) Go on a patron page >5) Checkout this item >6) Click on "Print" > "Print summary" >7) Without patch you get the error : >Can't call method "description" on an undefined value >8) With patch you see the itemtype description >--- > members/summary-print.pl | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/members/summary-print.pl b/members/summary-print.pl >index 352b49755e..58f9ba8582 100755 >--- a/members/summary-print.pl >+++ b/members/summary-print.pl >@@ -94,7 +94,9 @@ sub build_issue_data { > GetIssuingCharges( $checkout->{itemnumber}, $borrowernumber ); > > $itemtype = Koha::ItemTypes->find( $itemtype ); >- $checkout->{itemtype_description} = $itemtype->description; #FIXME Should not it be translated_description >+ if (defined $itemtype) { >+ $checkout->{itemtype_description} = $itemtype->description; #FIXME Should not it be translated_description >+ } > > $checkout->{charge} = sprintf( "%.2f", $charge ); # TODO Should be done in the template using Price > >-- >2.17.1
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 21842
:
82354
|
82355
|
82356
|
82656
|
82657
|
82658