Bugzilla – Attachment 78146 Details for
Bug 21168
Error on circ/returns.pl after deleting checked-in item
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21168: Handle deleted checked-in items on checking in
Bug-21168-Handle-deleted-checked-in-items-on-check.patch (text/plain), 1.45 KB, created by
Tomás Cohen Arazi (tcohen)
on 2018-08-24 17:36:32 UTC
(
hide
)
Description:
Bug 21168: Handle deleted checked-in items on checking in
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2018-08-24 17:36:32 UTC
Size:
1.45 KB
patch
obsolete
>From 5c8b58c157f9186622bf22d538f06d55ddcade9c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 10 Aug 2018 17:02:38 -0300 >Subject: [PATCH] Bug 21168: Handle deleted checked-in items on checking in > >circ/returns.pl generates a server error when attempting to checkin an item while >the list of previously-returned items contains an item that has been deleted. >Error text: Can't call method "biblio" on an undefined value at /usr/share/koha/intranet/cgi-bin/circ/returns.pl line 606. > >Test plan: >- checkout two items >- checkin item1 >- on a separate tab, delete item1 >- on the original tab (which still shows item1 in the list of Checked-In Items), attempt to check in item2 >=> No error appears > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > circ/returns.pl | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/circ/returns.pl b/circ/returns.pl >index a82bdc1432..a726e5980d 100755 >--- a/circ/returns.pl >+++ b/circ/returns.pl >@@ -551,6 +551,8 @@ foreach ( sort { $a <=> $b } keys %returneditems ) { > } > > my $item = Koha::Items->find({ barcode => $bar_code }); >+ next unless $item; # FIXME The item has been deleted in the meantime, >+ # we could handle that better displaying a message in the template > my $biblio = $item->biblio; > # FIXME pass $item to the template and we are done here... > $ri{itembiblionumber} = $biblio->biblionumber; >-- >2.18.0
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 21168
:
77715
|
78146
|
78172