Bugzilla – Attachment 87003 Details for
Bug 22076
SIP checkin for withdrawn item returns ok in checkin response
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22076: SIP checkin for withdrawn item returns ok in checkin response
Bug-22076-SIP-checkin-for-withdrawn-item-returns-o.patch (text/plain), 2.76 KB, created by
Martin Renvoize (ashimema)
on 2019-03-26 07:19:19 UTC
(
hide
)
Description:
Bug 22076: SIP checkin for withdrawn item returns ok in checkin response
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-03-26 07:19:19 UTC
Size:
2.76 KB
patch
obsolete
>From 6e07ce11a425c20d65b843aa538c5c065d30e9e7 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 7 Jan 2019 12:46:29 -0500 >Subject: [PATCH] Bug 22076: SIP checkin for withdrawn item returns ok in > checkin response > >If an item that is withdrawn is checked in via SIP2, Koha does not process the checkin, but still indicates the checkin succeeded via the ok flag in the checkin response message. > >To recreate: > 1 - Mark an item withdrawn > 2 - Set up sip server: > https://wiki.koha-community.org/wiki/Koha_SIP2_server_setup > 3 - Set 'BlockReturnOfWithdrawnItems' to block > 4 - Use the sip_cli_emulator to checkin the withdrawn item > 5 - There is no error in the checkin > >Test Plan: >1) Mark an item withdrawn >2) Set BlockReturnOfWithdrawnItems to block >3) Use the sip cli emulator to checkin the withdrawn item >4) Note the response begins with 101 >5) Apply this patch >6) Restart all the things ( including SIP server ) >7) Repeat checkin with sip cli emulator >8) Note the checkin now beings with 100 > >Signed-off-by: Geeta Halley <ghalley@roundrocktexas.gov> >Rescued-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/SIP/ILS.pm | 6 +++++- > C4/SIP/ILS/Transaction/Checkin.pm | 2 ++ > 2 files changed, 7 insertions(+), 1 deletion(-) > >diff --git a/C4/SIP/ILS.pm b/C4/SIP/ILS.pm >index b115dcd1a1..1c68c4b82d 100644 >--- a/C4/SIP/ILS.pm >+++ b/C4/SIP/ILS.pm >@@ -205,8 +205,9 @@ sub checkin { > # BEGIN TRANSACTION > $circ->item( $item = C4::SIP::ILS::Item->new($item_id) ); > >+ my $data; > if ($item) { >- $circ->do_checkin( $current_loc, $return_date, $cv_triggers_alert ); >+ $data = $circ->do_checkin( $current_loc, $return_date, $cv_triggers_alert ); > } > else { > $circ->alert(1); >@@ -219,6 +220,9 @@ sub checkin { > if( !$circ->ok && $circ->alert_type && $circ->alert_type == 98 ) { # data corruption > $circ->screen_msg("Checkin failed: data problem"); > syslog( "LOG_WARNING", "Problem with issue_id in issues and old_issues; check the about page" ); >+ } elsif( $data->{messages}->{withdrawn} && !$circ->ok ) { >+ $circ->screen_msg("Item withdrawn, return not allowed"); >+ syslog("LOG_DEBUG", "C4::SIP::ILS::Checkin - item withdrawn"); > } elsif( !$item->{patron} ) { > if( $checked_in_ok ) { # Mark checkin ok although book not checked out > $circ->ok( 1 ); >diff --git a/C4/SIP/ILS/Transaction/Checkin.pm b/C4/SIP/ILS/Transaction/Checkin.pm >index 0303a47e97..99a84d193a 100644 >--- a/C4/SIP/ILS/Transaction/Checkin.pm >+++ b/C4/SIP/ILS/Transaction/Checkin.pm >@@ -129,6 +129,8 @@ sub do_checkin { > } > > $self->ok($return); >+ >+ return { messages => $messages }; > } > > sub resensitize { >-- >2.20.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 22076
:
83694
|
83709
|
83737
|
83738
|
83739
|
87000
|
87001
|
87002
| 87003 |
87004
|
87005