Bugzilla – Attachment 77715 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.40 KB, created by
Jonathan Druart
on 2018-08-10 20:05:25 UTC
(
hide
)
Description:
Bug 21168: Handle deleted checked-in items on checking in
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-08-10 20:05:25 UTC
Size:
1.40 KB
patch
obsolete
>From 5d9f21a0f1244834c1785dc276c61bd9420ecf0b 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 >--- > 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.11.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