Bugzilla – Attachment 48049 Details for
Bug 12426
Allow resending of emails from the notices tab in the patron account
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12426: [QA Follow-up] Clear to_address to force update
Bug-12426-QA-Follow-up-Clear-toaddress-to-force-up.patch (text/plain), 1.83 KB, created by
Marcel de Rooy
on 2016-02-15 08:29:21 UTC
(
hide
)
Description:
Bug 12426: [QA Follow-up] Clear to_address to force update
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2016-02-15 08:29:21 UTC
Size:
1.83 KB
patch
obsolete
>From 18a6c43750e746e4fac952ed39c20b7b1e46f56d Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 15 Feb 2016 09:13:58 +0100 >Subject: [PATCH] Bug 12426: [QA Follow-up] Clear to_address to force update >Content-Type: text/plain; charset=utf-8 > >When resending an email from the Notices tab in Patrons, we would like >to use the recent email address. > >Test plan: >[1] Look up a patron with some notices sent. >[2] Adjust the patron email address (watch AutoEmailPrimaryAddress). >[3] Resend the notice. Verify if the new address was used. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/Letters.pm | 17 +++++++++++------ > 1 file changed, 11 insertions(+), 6 deletions(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index 79db37a..9c60def 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -1111,7 +1111,7 @@ sub GetMessage { > Updates the message to 'pending' status so that > it will be resent later on. > >- returns 1 on success, 0 on failure >+ returns 1 on success, 0 on failure, undef if no message was found > > =cut > >@@ -1121,13 +1121,18 @@ sub ResendMessage { > > my $message = GetMessage( $message_id ); > return unless $message; >+ my $rv = 0; > if ( $message->{status} ne 'pending' ) { >- return ((C4::Letters::_set_message_status( { >- message_id => $message_id, >- status => 'pending', >- } ) > 0) ? 1:0); >+ $rv = C4::Letters::_set_message_status({ >+ message_id => $message_id, >+ status => 'pending', >+ }); >+ $rv = $rv > 0? 1: 0; >+ # Clear destination email address to force address update >+ _update_message_to_address( $message_id, undef ) if $rv && >+ $message->{message_transport_type} eq 'email'; > } >- return 0; >+ return $rv; > } > > =head2 _add_attachements >-- >1.7.10.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 12426
:
42295
|
42346
|
42401
|
42409
|
42418
|
42512
|
42615
|
42618
|
42620
|
42621
|
47563
|
47564
|
47565
|
47588
|
47589
|
47590
|
47956
|
47957
|
47958
|
48049
|
48570
|
48571
|
48572
|
48573