Bugzilla – Attachment 157998 Details for
Bug 17617
Add the ability of sending a confirmation e-mail to patron when hold is placed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17617: Confirmation email to patron when hold is placed
Bug-17617-Confirmation-email-to-patron-when-hold-i.patch (text/plain), 2.94 KB, created by
ByWater Sandboxes
on 2023-10-27 18:13:23 UTC
(
hide
)
Description:
Bug 17617: Confirmation email to patron when hold is placed
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2023-10-27 18:13:23 UTC
Size:
2.94 KB
patch
obsolete
>From d3f5ba848d4cbf44fc3352400e4191cf27f3675b Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Thu, 26 Oct 2023 21:06:56 +0000 >Subject: [PATCH] Bug 17617: Confirmation email to patron when hold is placed > >This enhancement adds a new notice HOLDPLACED_PATRON that will be sent to a patron when a hold is placed for them. It depends on the new system preference EmailPatronWhenHoldIsPlaced to be enabled. > >To test: >1) Update database and restart services >2) Go to Koha Administration -> System preferences and search for the new EmailPatronWhenHoldIsPlaced syspref. It should be disabled by default - leave it disabled for now. >3) Search for a record and go to the Holds tab. Place a hold for your patron. >4) Go to your patron's account and go to the Notices tab. Confirm the HOLDPLACED_PATRON notice was NOT queued. >5) Enable the EmailPatronWhenHoldIsPlaced syspref. >6) Repeat steps 3 and 4. Confirm the HOLDPLACED_PATRON notice WAS generated and queued. >7) Confirm tests pass t/db_dependent/Holds.t > >Sponsored-by: Fire and Emergency New Zealand >Signed-off-by: Kelly <kelly@bywatersolutions.com> >--- > C4/Reserves.pm | 34 +++++++++++++++++++++++++++++++++- > 1 file changed, 33 insertions(+), 1 deletion(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index da7e13a75b..dc5a982720 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -166,7 +166,7 @@ BEGIN { > } > ); > >-Adds reserve and generates HOLDPLACED message. >+Adds reserve and generates HOLDPLACED message and HOLDPLACED_PATRON message. > > The following tables are available witin the HOLDPLACED message: > >@@ -177,6 +177,11 @@ The following tables are available witin the HOLDPLACED message: > items > reserves > >+The following tables are available within the HOLDPLACED_PATRON message: >+ >+ borrowers >+ reserves >+ > =cut > > sub AddReserve { >@@ -306,6 +311,33 @@ sub AddReserve { > } > } > >+ # Send email to patron if syspref is active >+ if ( C4::Context->preference("EmailPatronWhenHoldIsPlaced") ) { >+ my $patron = $hold->patron; >+ if ( >+ my $letter = C4::Letters::GetPreparedLetter( >+ module => 'reserves', >+ letter_code => 'HOLDPLACED_PATRON', >+ branchcode => $branch, >+ lang => $patron->lang, >+ tables => { >+ borrowers => $patron->unblessed, >+ reserves => $hold->unblessed, >+ }, >+ ) >+ ) >+ { >+ C4::Letters::EnqueueLetter( >+ { >+ letter => $letter, >+ borrowernumber => $borrowernumber, >+ message_transport_type => 'email', >+ to_address => $patron->notice_email_address, >+ } >+ ); >+ } >+ } >+ > Koha::Plugins->call('after_hold_create', $hold); > Koha::Plugins->call( > 'after_hold_action', >-- >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 17617
:
157961
|
157962
|
157963
|
157964
|
157995
|
157996
|
157997
|
157998
|
158310
|
158311
|
158312
|
158313