Bugzilla – Attachment 160500 Details for
Bug 35692
ONLYMESSAGE option in UpdateNotforLoanStatusOnCheckin is not honored
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35692: Do not update not for loan status if ONLYMESSAGE is provided
Bug-35692-Do-not-update-not-for-loan-status-if-ONL.patch (text/plain), 2.61 KB, created by
Nick Clemens (kidclamp)
on 2024-01-03 19:52:02 UTC
(
hide
)
Description:
Bug 35692: Do not update not for loan status if ONLYMESSAGE is provided
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-01-03 19:52:02 UTC
Size:
2.61 KB
patch
obsolete
>From 1809b27b559a37986df3e2584417923f1c83fbc9 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 3 Jan 2024 19:46:34 +0000 >Subject: [PATCH] Bug 35692: Do not update not for loan status if ONLYMESSAGE > is provided > >To test: >1 - Set UpdateNotForLoanStatusOnCheckin to: >_ALL_: > -1: ONLYMESSAGE >2 - Set an item in the catalog as -1/Ordered >3 - Check the item in >4 - Confirm you see the message >5 - View the record details >6 - Item is now for loan >7 - Check item in again, no message >8 - Apply patch, restart all >9 - Set item as not for loan -1/Ordered >10 - Check item in, you see the message >11 - Check it in again, still see message >12 - Check the detail page, item still marked as ordered >--- > C4/Circulation.pm | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 562cad72671..3943ca89acf 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2228,7 +2228,9 @@ sub AddReturn { > foreach my $notloan_rule_key (keys %{ $rules->{$item->itype}} ) { > if ( $item->notforloan eq $notloan_rule_key ) { > $messages->{'NotForLoanStatusUpdated'} = { from => $item->notforloan, to => $rules->{$item->itype}->{$notloan_rule_key} }; >- $item->notforloan($rules->{$item->itype}->{$notloan_rule_key})->store({ log_action => 0, skip_record_index => 1, skip_holds_queue => 1 }); >+ $item->notforloan( $rules->{ $item->itype }->{$notloan_rule_key} ) >+ ->store( { log_action => 0, skip_record_index => 1, skip_holds_queue => 1 } ) >+ unless $rules->{ $item->itype }->{$notloan_rule_key} eq 'ONLYMESSAGE'; > last; > } > } >@@ -2236,7 +2238,9 @@ sub AddReturn { > foreach my $notloan_rule_key (keys %{ $rules->{'_ALL_'}} ) { > if ( $item->notforloan eq $notloan_rule_key ) { > $messages->{'NotForLoanStatusUpdated'} = { from => $item->notforloan, to => $rules->{'_ALL_'}->{$notloan_rule_key} }; >- $item->notforloan($rules->{'_ALL_'}->{$notloan_rule_key})->store({ log_action => 0, skip_record_index => 1, skip_holds_queue => 1 }); >+ $item->notforloan( $rules->{'_ALL_'}->{$notloan_rule_key} ) >+ ->store( { log_action => 0, skip_record_index => 1, skip_holds_queue => 1 } ) >+ unless $rules->{'_ALL_'}->{$notloan_rule_key} eq 'ONLYMESSAGE'; > last; > } > } >-- >2.30.2
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 35692
:
160499
|
160500
|
160501
|
160502