Bugzilla – Attachment 191984 Details for
Bug 20844
Reset a hold when it is missing after allocation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20844: Prevent double notices and ensure notice sent from additem.pl
Bug-20844-Prevent-double-notices-and-ensure-notice.patch (text/plain), 2.04 KB, created by
Andrew Fuerste-Henry
on 2026-01-23 19:41:07 UTC
(
hide
)
Description:
Bug 20844: Prevent double notices and ensure notice sent from additem.pl
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2026-01-23 19:41:07 UTC
Size:
2.04 KB
patch
obsolete
>From 2c064394d3d0f424bfd974d009f1c11b3fc73dc2 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 23 Jan 2026 17:13:51 +0000 >Subject: [PATCH] Bug 20844: Prevent double notices and ensure notice sent from > additem.pl > >for additem.pl we need to mark the item as lost before we call lost item > >To prevent double messages we don't send a notice when cancelling or reverting an >item level hold, we send on the initial mark lost >--- > C4/Circulation.pm | 7 ++++++- > cataloguing/additem.pl | 6 +++--- > 2 files changed, 9 insertions(+), 4 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 4f07fedb2f2..56175a8183f 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -4494,7 +4494,12 @@ sub LostItem { > } > > # SendLostHoldNotices >- if ( C4::Context->preference('SendLostHoldNotices') && defined $hold && $item->itemlost ) { >+ # If the reserve is being cancelled or reverted this is an item level hold an will have already been sent when item was marked lost >+ if ( C4::Context->preference('SendLostHoldNotices') >+ && defined $hold >+ && $item->itemlost >+ && !defined $params->{cancel_reserve} ) >+ { > my $letter = C4::Letters::GetPreparedLetter( > module => 'reserves', > letter_code => 'LOST_WAITING_HOLD', >diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl >index 2268a8602e6..928bb94c999 100755 >--- a/cataloguing/additem.pl >+++ b/cataloguing/additem.pl >@@ -640,13 +640,13 @@ if ( $op eq "cud-additem" ) { > $current_item = $item->unblessed; # Restore edit form for the same item > } else { > my $newitemlost = $item->itemlost; >- if ( $newitemlost && $newitemlost ge '1' && !$olditemlost ) { >- LostItem( $item->itemnumber, 'additem' ); >- } > try { > $item->store; > } catch { > push @errors, $_->error; >+ }; >+ if ( $newitemlost && $newitemlost ge '1' && !$olditemlost ) { >+ LostItem( $item->itemnumber, 'additem' ); > } > } > >-- >2.39.5
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 20844
:
79267
|
80760
|
80761
|
80890
|
80891
|
81045
|
81531
|
81623
|
81624
|
81640
|
81697
|
81698
|
81710
|
81711
|
81712
|
102334
|
102335
|
102336
|
113208
|
113209
|
113210
|
118264
|
118265
|
118266
|
125437
|
125438
|
125439
|
140214
|
140215
|
140216
|
150348
|
150349
|
150350
|
150480
|
159062
|
159063
|
159064
|
159065
|
159111
|
170263
|
170264
|
189623
|
189648
|
189688
|
189973
|
191958
|
191959
|
191960
|
191966
|
191981
|
191982
|
191983
| 191984