Bugzilla – Attachment 90505 Details for
Bug 23057
If checked_in_ok is set and item is not checked out, alert flag is supressed for *any* reason
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23057: If checked_in_ok is set and item is not checked out, alert flag is supressed for *any* reason
Bug-23057-If-checkedinok-is-set-and-item-is-not-ch.patch (text/plain), 3.21 KB, created by
Kyle M Hall (khall)
on 2019-06-11 16:23:01 UTC
(
hide
)
Description:
Bug 23057: If checked_in_ok is set and item is not checked out, alert flag is supressed for *any* reason
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2019-06-11 16:23:01 UTC
Size:
3.21 KB
patch
obsolete
>From 143130d8c7f20dbe94615775f705b4a3838eee56 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Thu, 6 Jun 2019 10:31:13 +1000 >Subject: [PATCH] Bug 23057: If checked_in_ok is set and item is not checked > out, alert flag is supressed for *any* reason > >This patch fixes a bug from Bug 15221 and hopefully also makes it so that the alert flag >is suppressed when checked_in_ok is set and an item is not checked out. > >To test: > >0) Create patron in web interface with a cardnumber and userid of "staff" with a password >that matches the account in SIPconfig.xml. Also set their branch to CPL >(also matching SIPconfig.xml). >1) Create an item with a barcode of 'test' >2) Choose a patron to check out to and record their borrowernumber > >In one terminal: >3) cd to your git directory (e.g. /home/koha/koha) >4) perl ./C4/SIP/SIPServer.pm ~/koha-dev/etc/SIPconfig.xml > >In another terminal: >5) cd to your git directory (e.g. /home/koha/koha) >6) perl ./misc/sip_cli_emulator.pl -l CPL -su staff -sp <password> --port=6001 --address=localhost --item test -m checkin --patron <borrowernumber> >NOTE: You need to replace <borrowernumber> with the borrowernumber from Step 2, and <password> with the password from Step 0. > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> > >Signed-off-by: Matha Fuerst <mfuerst@hmcpl.org> >--- > C4/SIP/ILS.pm | 3 +-- > C4/SIP/ILS/Transaction/Checkin.pm | 8 +++++++- > 2 files changed, 8 insertions(+), 3 deletions(-) > >diff --git a/C4/SIP/ILS.pm b/C4/SIP/ILS.pm >index e6f3794c97..b543539dd0 100644 >--- a/C4/SIP/ILS.pm >+++ b/C4/SIP/ILS.pm >@@ -207,7 +207,7 @@ sub checkin { > > my $data; > if ($item) { >- $data = $circ->do_checkin( $current_loc, $return_date, $cv_triggers_alert ); >+ $data = $circ->do_checkin( $current_loc, $return_date, $cv_triggers_alert, $checked_in_ok ); > } > else { > $circ->alert(1); >@@ -229,7 +229,6 @@ sub checkin { > } elsif ( !$item->{patron} ) { > if ( $checked_in_ok ) { # Mark checkin ok although book not checked out > $circ->ok( 1 ); >- $circ->alert( 0 ); > syslog("LOG_DEBUG", "C4::SIP::ILS::Checkin - using checked_in_ok"); > } else { > $circ->screen_msg("Item not checked out"); >diff --git a/C4/SIP/ILS/Transaction/Checkin.pm b/C4/SIP/ILS/Transaction/Checkin.pm >index 99a84d193a..67d0b1d792 100644 >--- a/C4/SIP/ILS/Transaction/Checkin.pm >+++ b/C4/SIP/ILS/Transaction/Checkin.pm >@@ -49,6 +49,7 @@ sub do_checkin { > my $branch = shift; > my $return_date = shift; > my $cv_triggers_alert = shift; >+ my $checked_in_ok = shift; > > if (!$branch) { > $branch = 'SIP2'; >@@ -69,7 +70,12 @@ sub do_checkin { > > $debug and warn "do_checkin() calling AddReturn($barcode, $branch)"; > my ($return, $messages, $issue, $borrower) = AddReturn($barcode, $branch, undef, dt_from_string($return_date)); >- $self->alert(!$return); >+ if ($checked_in_ok){ >+ $debug and warn 'not raising alert when AddReturn() does not return a value for $return due to $checked_in_ok being set to true'; >+ } >+ else { >+ $self->alert(!$return); >+ } > # ignoring messages: NotIssued, WasLost, WasTransfered > > # biblionumber, biblioitemnumber, itemnumber >-- >2.20.1 (Apple Git-117)
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 23057
:
90344
|
90377
|
90384
|
90385
|
90388
|
90479
|
90480
|
90505
|
90506
|
90507
|
90508
|
91322
|
91323
|
91324
|
91325
|
91326
|
91644