Bugzilla – Attachment 160502 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.66 KB, created by
David Nind
on 2024-01-03 22:16:02 UTC
(
hide
)
Description:
Bug 35692: Do not update not for loan status if ONLYMESSAGE is provided
Filename:
MIME Type:
Creator:
David Nind
Created:
2024-01-03 22:16:02 UTC
Size:
2.66 KB
patch
obsolete
>From e5d2db78484a7eb44639dbda2b97b578d18861c9 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 > >Signed-off-by: David Nind <david@davidnind.com> >--- > C4/Circulation.pm | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 562cad7267..3943ca89ac 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