Bugzilla – Attachment 158599 Details for
Bug 35279
Add fallback for WELCOME notice to allow 'print' when patrons are missing email address
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35279: Add fallback to print for 'Send welcome email'
Bug-35279-Add-fallback-to-print-for-Send-welcome-e.patch (text/plain), 2.98 KB, created by
Martin Renvoize (ashimema)
on 2023-11-07 14:12:12 UTC
(
hide
)
Description:
Bug 35279: Add fallback to print for 'Send welcome email'
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-11-07 14:12:12 UTC
Size:
2.98 KB
patch
obsolete
>From 5eac04a3081e41e8ac49368df9f19d3c79b7176f Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 7 Nov 2023 14:03:00 +0000 >Subject: [PATCH] Bug 35279: Add fallback to print for 'Send welcome email' > >We update the 'Send welcome email' button to read 'Send welcome notice' >and add a fallback to enqueue a notice for print when the user doesn't >have an email address defined. > >Test plan >1) Apply patch >2) Use the 'Henry Acevedo' user who doesn't yet have a valid email > address. >3) Click the 'Send welcome notice' button available from the 'more' > menu. >4) Note that no notice is queued at all. >5) Copy the content of the 'email' WELCOME notice into the 'print' > template. >5) Repeat step 3. >6) Note that this time a 'print' type notice is queued for the user. >--- > .../prog/en/includes/members-toolbar.inc | 2 +- > members/notices.pl | 23 +++++++++++++++++++ > 2 files changed, 24 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >index ddb03e62f35..1fc5402c2d3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >@@ -76,7 +76,7 @@ > [% END %] > > [% IF CAN_user_borrowers_edit_borrowers %] >- <li><a id="sendwelcome" href="/cgi-bin/koha/members/notices.pl?borrowernumber=[% patron.borrowernumber | uri %]&op=send_welcome">Send welcome email</a></li> >+ <li><a id="sendwelcome" href="/cgi-bin/koha/members/notices.pl?borrowernumber=[% patron.borrowernumber | uri %]&op=send_welcome">Send welcome notice</a></li> > [% END %] > > [% IF CAN_user_borrowers_edit_borrowers && patron.category.effective_reset_password %] >diff --git a/members/notices.pl b/members/notices.pl >index 11f3faa917a..9635340f8f2 100755 >--- a/members/notices.pl >+++ b/members/notices.pl >@@ -88,6 +88,29 @@ if ( $op eq 'send_welcome' ) { > } > ); > }; >+ } else { >+ eval { >+ my $letter = GetPreparedLetter( >+ module => 'members', >+ letter_code => 'WELCOME', >+ branchcode => $patron->branchcode,, >+ lang => $patron->lang || 'default', >+ tables => { >+ 'branches' => $patron->branchcode, >+ 'borrowers' => $patron->borrowernumber, >+ }, >+ want_librarian => 1, >+ mtt => 'print' >+ ) or return; >+ >+ my $message_id = EnqueueLetter( >+ { >+ letter => $letter, >+ borrowernumber => $patron->id, >+ message_transport_type => 'print' >+ } >+ ); >+ }; > } > > # redirect to self to avoid form submission on refresh >-- >2.41.0
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 35279
:
158599
|
158601
|
158612
|
161547