Bugzilla – Attachment 5414 Details for
Bug 3704
SIP Checkin of not checked out item returns error without additional reason
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
bug 3704 patch
0001-Bug-3704-SIP-Checkin-of-not-checked-out-item-returns.patch (text/plain), 1.43 KB, created by
Ulrich Kleiber
on 2011-09-13 10:09:34 UTC
(
hide
)
Description:
bug 3704 patch
Filename:
MIME Type:
Creator:
Ulrich Kleiber
Created:
2011-09-13 10:09:34 UTC
Size:
1.43 KB
patch
obsolete
>From 860ea0ed77df29cbfad9389fae5fc2d914f35f65 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer@bsz-bw.de> >Date: Fri, 2 Sep 2011 16:21:23 +0200 >Subject: [PATCH] Bug 3704: SIP Checkin of not checked out item returns error without reason > >Checking in an available item returns an error (which is correct) without >giving a reason for the failure as screen_msg (aka AF field in SIP2 is empty). > >Based on code suggested by Patrick Langer <patrick.langer@easycheck.org> > >Signed-off-by: Ulrich Kleiber <ulrich.kleiber@bsz-bw.de> >--- > C4/SIP/ILS.pm | 16 ++++++++++------ > 1 files changed, 10 insertions(+), 6 deletions(-) > >diff --git a/C4/SIP/ILS.pm b/C4/SIP/ILS.pm >index 9e20845..f61f5ba 100644 >--- a/C4/SIP/ILS.pm >+++ b/C4/SIP/ILS.pm >@@ -190,12 +190,16 @@ sub checkin { > # It's ok to check it in if it exists, and if it was checked out > $circ->ok($item && $item->{patron}); > >- if ($circ->ok) { >- $circ->patron($patron = new ILS::Patron $item->{patron}); >- delete $item->{patron}; >- delete $item->{due_date}; >- $patron->{items} = [ grep {$_ ne $item_id} @{$patron->{items}} ]; >- } >+ if (!defined($item->{patron})) { >+ $circ->screen_msg("Item not checked out"); >+ } else { >+ if ($circ->ok) { >+ $circ->patron($patron = new ILS::Patron $item->{patron}); >+ delete $item->{patron}; >+ delete $item->{due_date}; >+ $patron->{items} = [ grep {$_ ne $item_id} @{$patron->{items}} ]; >+ } >+ } > # END TRANSACTION > > return $circ; >-- >1.7.0.4 >
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 3704
: 5414