Bugzilla – Attachment 85884 Details for
Bug 22043
SIP Checkin Response alert flag set to often set to Y incorrectly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22043: (QA Follow-up) Add paramter to control behavior
Bug-22043-QA-Follow-up-Add-paramter-to-control-beh.patch (text/plain), 4.02 KB, created by
Kyle M Hall
on 2019-02-28 21:13:28 UTC
(
hide
)
Description:
Bug 22043: (QA Follow-up) Add paramter to control behavior
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2019-02-28 21:13:28 UTC
Size:
4.02 KB
patch
obsolete
>From 94d6ed507763e1311e63cea28db9a719b388ea1f Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 28 Feb 2019 16:13:11 -0500 >Subject: [PATCH] Bug 22043: (QA Follow-up) Add paramter to control behavior > >--- > C4/SIP/ILS.pm | 4 ++-- > C4/SIP/ILS/Transaction/Checkin.pm | 11 ++++++++++- > C4/SIP/Sip/MsgType.pm | 2 +- > etc/SIPconfig.xml | 1 + > 4 files changed, 14 insertions(+), 4 deletions(-) > >diff --git a/C4/SIP/ILS.pm b/C4/SIP/ILS.pm >index 1bd23c6429..b115dcd1a1 100644 >--- a/C4/SIP/ILS.pm >+++ b/C4/SIP/ILS.pm >@@ -197,7 +197,7 @@ sub test_cardnumber_compare { > } > > sub checkin { >- my ( $self, $item_id, $trans_date, $return_date, $current_loc, $item_props, $cancel, $checked_in_ok ) = @_; >+ my ( $self, $item_id, $trans_date, $return_date, $current_loc, $item_props, $cancel, $checked_in_ok, $cv_triggers_alert ) = @_; > my ( $patron, $item, $circ ); > > $circ = C4::SIP::ILS::Transaction::Checkin->new(); >@@ -206,7 +206,7 @@ sub checkin { > $circ->item( $item = C4::SIP::ILS::Item->new($item_id) ); > > if ($item) { >- $circ->do_checkin( $current_loc, $return_date ); >+ $circ->do_checkin( $current_loc, $return_date, $cv_triggers_alert ); > } > else { > $circ->alert(1); >diff --git a/C4/SIP/ILS/Transaction/Checkin.pm b/C4/SIP/ILS/Transaction/Checkin.pm >index 77eb36161f..530e6a6a44 100644 >--- a/C4/SIP/ILS/Transaction/Checkin.pm >+++ b/C4/SIP/ILS/Transaction/Checkin.pm >@@ -47,6 +47,7 @@ sub do_checkin { > my $self = shift; > my $branch = shift; > my $return_date = shift; >+ my $cv_triggers_alert = shift; > if (!$branch) { > $branch = 'SIP2'; > } >@@ -66,6 +67,8 @@ sub do_checkin { > > $debug and warn "do_checkin() calling AddReturn($barcode, $branch)"; > my ($return, $messages, $issue, $borrower) = AddReturn($barcode, $branch, undef, undef, $return_date); >+ $self->alert(!$return); >+ # ignoring messages: NotIssued, WasLost, WasTransfered > > # biblionumber, biblioitemnumber, itemnumber > # borrowernumber, reservedate, branchcode >@@ -115,7 +118,13 @@ sub do_checkin { > $self->{item}->hold_patron_id( $messages->{ResFound}->{borrowernumber} ); > $self->{item}->destination_loc( $messages->{ResFound}->{branchcode} ); > } >- $self->alert(defined $self->alert_type); # alert_type could be "00", hypothetically >+ >+ if ( $cv_triggers_alert ) { >+ $self->alert(defined $self->alert_type); # Overwrites existing alert value >+ } else { >+ $self->alert(1) if defined $self->alert_type; # Doesn't affect alert value unless an alert type is set >+ } >+ > $self->ok($return); > } > >diff --git a/C4/SIP/Sip/MsgType.pm b/C4/SIP/Sip/MsgType.pm >index 061a2556b5..6c2e4fc98c 100644 >--- a/C4/SIP/Sip/MsgType.pm >+++ b/C4/SIP/Sip/MsgType.pm >@@ -637,7 +637,7 @@ sub handle_checkin { > syslog( "LOG_WARNING", "received no-block checkin from terminal '%s'", $account->{id} ); > $status = $ils->checkin_no_block( $item_id, $trans_date, $return_date, $item_props, $cancel ); > } else { >- $status = $ils->checkin( $item_id, $trans_date, $return_date, $my_branch, $item_props, $cancel, $account->{checked_in_ok} ); >+ $status = $ils->checkin( $item_id, $trans_date, $return_date, $my_branch, $item_props, $cancel, $account->{checked_in_ok}, $account->{cv_triggers_alert} ); > } > > $patron = $status->patron; >diff --git a/etc/SIPconfig.xml b/etc/SIPconfig.xml >index 7a2fd65cc3..1e17ef0338 100644 >--- a/etc/SIPconfig.xml >+++ b/etc/SIPconfig.xml >@@ -53,6 +53,7 @@ > send_patron_home_library_in_af="1" > cv_send_00_on_success="1" > ct_always_send="1" >+ cv_triggers_alert="1" > ae_field_template="[% patron.surname %][% IF patron.firstname %], [% patron.firstname %][% END %]" > da_field_template="[% patron.surname %][% IF patron.firstname %], [% patron.firstname %][% END %]" > av_field_template="[% accountline.description %] [% accountline.amountoutstanding | format('%.2f') %]" > >-- >2.17.2 (Apple Git-113)
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 22043
:
83468
|
83578
|
85884
|
85897
|
86668
|
86669