Bugzilla – Attachment 69404 Details for
Bug 19496
Patron notes about item does not get emailed as indicated
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19496: Fixing to_address for patron notes
Bug-19496-Fixing-toaddress-for-patron-notes.patch (text/plain), 3.12 KB, created by
Aleisha Amohia
on 2017-11-27 22:10:41 UTC
(
hide
)
Description:
Bug 19496: Fixing to_address for patron notes
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2017-11-27 22:10:41 UTC
Size:
3.12 KB
patch
obsolete
>From e0eae9d3f2ebb69893a0c6af65f3944e091ec0cd Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Mon, 27 Nov 2017 21:33:58 +0000 >Subject: [PATCH] Bug 19496: Fixing to_address for patron notes > >This patch ensures the patron note to_address is the branch email or the >Koha Admin email, and the from_address is the patron's email. > >To test: >1) Ensure syspref 'allowcheckoutnotes' is turned on >2) Go to OPAC, leave a note on a checkout >3) Confirm that the note is received (in mysql message_queue) but the >to_address is the patron's email - this is wrong >4) Apply patch and refresh OPAC >5) Leave a note on a checkout >6) Confirm that the note is received in message queue >7) Confirm that the to_address is one of: >- branch email >- branch reply to >- syspref ReplytoDefault >- syspref KohaAdminEmailAddress >8) Confirm that the from_address is one of: >- patron email >- patron emailpro >- patron B_email > >Sponsored-by: Catalyst IT >--- > opac/opac-issue-note.pl | 12 +++++++++++- > opac/svc/patron_notes | 12 +++++++++++- > 2 files changed, 22 insertions(+), 2 deletions(-) > >diff --git a/opac/opac-issue-note.pl b/opac/opac-issue-note.pl >index 376a32c..86c6d67 100755 >--- a/opac/opac-issue-note.pl >+++ b/opac/opac-issue-note.pl >@@ -79,7 +79,17 @@ if ( $action eq 'issuenote' && C4::Context->preference('AllowCheckoutNotes') ) { > 'borrowers' => $borrowernumber, > }, > ); >- C4::Message->enqueue($letter, $patron->unblessed, 'email'); >+ >+ my $to_address = $branch->branchemail || $branch->branchreplyto || C4::Context->ReplytoDefault || C4::Context->preference('KohaAdminEmailAddress'); >+ my $from_address = $patron->email || $patron->emailpro || $patron->B_email; >+ >+ C4::Letters::EnqueueLetter({ >+ letter => $letter, >+ message_transport_type => 'email', >+ borrowernumber => $patron->borrowernumber, >+ to_address => $to_address, >+ from_address => $from_address, >+ }); > } > } > print $query->redirect("/cgi-bin/koha/opac-user.pl"); >diff --git a/opac/svc/patron_notes b/opac/svc/patron_notes >index 6110cf1..a8ab7b1 100755 >--- a/opac/svc/patron_notes >+++ b/opac/svc/patron_notes >@@ -89,7 +89,17 @@ if ($is_ajax) { > 'borrowers' => $borrowernumber, > }, > ); >- C4::Message->enqueue($letter, $patron->unblessed, 'email'); >+ >+ my $to_address = $branch->branchemail || $branch->branchreplyto || C4::Context->ReplytoDefault || C4::Context->preference('KohaAdminEmailAddress'); >+ my $from_address = $patron->email || $patron->emailpro || $patron->B_email; >+ >+ C4::Letters::EnqueueLetter({ >+ letter => $letter, >+ message_transport_type => 'email', >+ borrowernumber => $patron->borrowernumber, >+ to_address => $to_address, >+ from_address => $from_address, >+ }); > } else { # note empty, i.e removed > $status = "removed"; > } >-- >2.1.4
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 19496
:
69404
|
69455
|
69606
|
69611
|
70012
|
70013