Bugzilla – Attachment 90385 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: Update subroutine so tests pass
Bug-23057-Update-subroutine-so-tests-pass.patch (text/plain), 2.36 KB, created by
Kyle M Hall (khall)
on 2019-06-06 16:43:28 UTC
(
hide
)
Description:
Bug 23057: Update subroutine so tests pass
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2019-06-06 16:43:28 UTC
Size:
2.36 KB
patch
obsolete
>From 957402909fd618903db372f4721d4763b6f901fb Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 6 Jun 2019 12:42:46 -0400 >Subject: [PATCH] Bug 23057: Update subroutine so tests pass > >--- > C4/SIP/ILS/Transaction/Checkin.pm | 21 ++++++++++++--------- > 1 file changed, 12 insertions(+), 9 deletions(-) > >diff --git a/C4/SIP/ILS/Transaction/Checkin.pm b/C4/SIP/ILS/Transaction/Checkin.pm >index 67d0b1d792..4adce52605 100644 >--- a/C4/SIP/ILS/Transaction/Checkin.pm >+++ b/C4/SIP/ILS/Transaction/Checkin.pm >@@ -70,13 +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)); >- 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); >+ >+ if ( $checked_in_ok ) { >+ delete $messages->{NotIssued}; >+ delete $messages->{LocalUse}; >+ $return = 1 unless keys %$messages; > } >- # ignoring messages: NotIssued, WasLost, WasTransfered > > # biblionumber, biblioitemnumber, itemnumber > # borrowernumber, reservedate, branchcode >@@ -126,12 +125,16 @@ sub do_checkin { > $self->{item}->hold_patron_id( $messages->{ResFound}->{borrowernumber} ); > $self->{item}->destination_loc( $messages->{ResFound}->{branchcode} ); > } >+ # ignoring messages: NotIssued, WasLost, WasTransfered >+ >+ $self->alert(!$return) unless $checked_in_ok; >+ $debug and $checked_in_ok and warn 'Not raising alert when AddReturn() does not return a value for $return due to $checked_in_ok being set to true'; > >- my $alert = defined $self->alert_type; >+ my $has_alert_type = defined $self->alert_type; > if ( $cv_triggers_alert ) { >- $self->alert($alert); # Overwrites existing alert value, should set to 0 if there is no alert type >+ $self->alert($has_alert_type); # Overwrites existing alert value, should set to 0 if there is no alert type > } else { >- $self->alert($alert) if $alert; # Doesn't affect alert value unless an alert type is set >+ $self->alert($has_alert_type) if $has_alert_type; # Doesn't affect alert value unless an alert type is set > } > > $self->ok($return); >-- >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