Bugzilla – Attachment 82656 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.57 KB, created by
Fridolin Somers
on 2018-11-27 08:08:47 UTC
(
hide
)
Description:
Bug 21842: test Koha::ItemType in defined in patron summary print
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2018-11-27 08:08:47 UTC
Size:
1.57 KB
patch
obsolete
>From 1bf5450514b73122dbcc4d19abdbf6fccf3aeef5 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 | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/members/summary-print.pl b/members/summary-print.pl >index 352b49755e..52d9993c81 100755 >--- a/members/summary-print.pl >+++ b/members/summary-print.pl >@@ -94,7 +94,7 @@ 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 >+ $checkout->{itemtype_description} = defined $itemtype ? $itemtype->description : q{}; #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