From 47e57cbbc3640ceef304519706ec020e1d3ca7ba Mon Sep 17 00:00:00 2001 From: Alex Buckley Date: Sun, 12 Nov 2023 21:26:42 +0000 Subject: [PATCH] Bug 35293: Re-implement bug 30407 functionality To test: 1. Set items notforloan status as -1 (or create new one) 2. Add line "-1: ONLYMESSAGE" to UpdateNotForLoanStatusOnCheckin 3. Check item out for patron. 4. Check item in. => Description of notforloan status should be displayed. => Confirm notforloan status HAS changed. 5. Apply patch and update database if needed 6. Set items notforloan status as -1 (or create new one) 7. Check item out for patron. 8. Check item in. => Description of notforloan status should be displayed. => Confirm notforloan status HAS NOT changed. Also prove t/db_dependent/Circulation/issue.t Sponsored-by: Catalyst IT, New Zealand --- C4/Circulation.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index ac28b2e74b5..4c8deb13cf8 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2217,7 +2217,7 @@ 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; } } -- 2.20.1