Bugzilla – Attachment 82355 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 transfers to receive
Bug-21842-test-KohaItemType-in-defined-in-transfer.patch (text/plain), 1.63 KB, created by
Fridolin Somers
on 2018-11-15 10:55:19 UTC
(
hide
)
Description:
Bug 21842: test Koha::ItemType in defined in transfers to receive
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2018-11-15 10:55:19 UTC
Size:
1.63 KB
patch
obsolete
>From 7c3d7dcc25a7f6fb49399a3566bf847999784f1b Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Thu, 15 Nov 2018 10:17:17 +0100 >Subject: [PATCH] Bug 21842: test Koha::ItemType in defined in transfers to > receive > >Like Bug 19194 calls on $itemtype->value must test the object is defined. >This patch fixes circ/transferstoreceive.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) Create a transfers to receive on this item >5) Go to Circulation > Transfers to receive >6) Without patch you get the error : >Can't call method "description" on an undefined value >7) With patch you see the itemtype description >--- > circ/transferstoreceive.pl | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/circ/transferstoreceive.pl b/circ/transferstoreceive.pl >index a727dda165..13587e97b6 100755 >--- a/circ/transferstoreceive.pl >+++ b/circ/transferstoreceive.pl >@@ -95,7 +95,9 @@ while ( my $library = $libraries->next ) { > my $itemtype = Koha::ItemTypes->find( $item->effective_itemtype ); > > $getransf{'datetransfer'} = $num->{'datesent'}; >- $getransf{'itemtype'} = $itemtype->description; # FIXME Should not it be translated_description? >+ if (defined $itemtype) { >+ $getransf{'itemtype'} = $itemtype->description; # FIXME Should not it be translated_description? >+ } > %getransf = ( > %getransf, > title => $biblio->title, >-- >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