Closed Bug 100089 Opened 23 years ago Closed 18 years ago

Templatise 'passwordmail' email

Categories

(Bugzilla :: Email Notifications, enhancement, P1)

2.15
enhancement

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: CodeMachine, Assigned: emmanuel)

References

Details

Attachments

(1 file, 5 obsolete files)

We should aim to get rid of the "template" parameters now we have templates. 
These include things like bannerhtml, footerhtml & newchangedmail.
Whoops, wrong component.
Assignee: myk → justdave
Component: Creating/Changing Bugs → Administration
templates can include other templates, right?  If so this would probably work.

We'd need some sort of routine to compare the existing contents of those
parameters with the defaults and if they're different, create a copy of the
template with those contents in the custom folder...
Yes - currently there are footer and header templates.  However they currently
take the existing parameters.
It makes sense to do this after we finish templatizing the entire application,
since then we can make the change in one place and have it take effect for every
script.  Making this bug depend on bug 86168.
Depends on: bz-template
Priority: -- → P2
Target Milestone: --- → Bugzilla 2.16
Blocks: 97499
We are currently trying to wrap up Bugzilla 2.16.  We are now close enough to
release time that anything that wasn't already ranked at P1 isn't going to make
the cut.  Thus this is being retargetted at 2.18.  If you strongly disagree with
this retargetting, please comment, however, be aware that we only have about 2
weeks left to review and test anything at this point, and we intend to devote
this time to the remaining bugs that were designated as release blockers.
Target Milestone: Bugzilla 2.16 → Bugzilla 2.18
The HTML templates were removed over at bug #140437.  That just leaves the mail
templates.
Summary: Remove old "template" parameters. → Templatise mail messages, including mail "template" parameters.
Blocks: 152355
->Email notifications, since this is now a part of the bigger
making-mail-notifications-not-suck picture, and will have to be addressed as
part of bug 84876.
Assignee: justdave → preed
Severity: enhancement → major
Component: Administration → Email Notifications
Priority: P2 → P1
Blocks: 215210
Blocks: bz-template
No longer depends on: bz-template
Depends on: 84876
Target Milestone: Bugzilla 2.18 → Bugzilla 2.20
Blocks: 235720
Blocks: 84876
No longer depends on: 84876
Let's break this down. It should be really easy to templatize passwordmail. I'll
file bugs for whinemail, newchangedmail, and voteremovedmail.
No longer blocks: 152355, 215210, 235720
Summary: Templatise mail messages, including mail "template" parameters. → Templatise 'passwordmail' email
Depends on: 275636
No longer depends on: 275636
Severity: major → enhancement
As preed is no longer actively working on Bugzilla (from what I know), I somehow
doubt that this bug will make it in for 2.20. :-) If I'm wrong, feel free to
take it back and re-target it. :-)
Assignee: preed → email-notifications
Target Milestone: Bugzilla 2.20 → ---
Assignee: email-notifications → eseyman
Target Milestone: --- → Bugzilla 2.22
This modifies MailPassword() to use a template file instead of a parameter.
Attachment #182623 - Flags: review?
Attached file template for account creation mail (obsolete) —
Template to be used for creating the mail.
Should be in template/en/default/email/passwordmail.txt.tmpl
Attachment #182624 - Flags: review?
Status: NEW → ASSIGNED
Comment on attachment 182624 [details]
template for account creation mail

Kiko is listed as a template reviewer in
http://www.bugzilla.org/docs/reviewer-list.html#templates so he can probably
look over this. (Normally bugmail would probably be Jake, but I think he's not
around much lately.)
Attachment #182624 - Flags: review? → review?(kiko)
Comment on attachment 182623 [details] [diff] [review]
Patch to defparams.pl and CGI.pl to use a template instead of Param(passwordmail)

Hey Erik, I think this is mostly a param change, want to review it?
Attachment #182623 - Flags: review? → review?(erik)
Comment on attachment 182623 [details] [diff] [review]
Patch to defparams.pl and CGI.pl to use a template instead of Param(passwordmail)

CGI.pl no longer exists.
Attachment #182623 - Flags: review?(erik) → review-
Attachment #182623 - Attachment is obsolete: true
Attached file template for account creation mail (obsolete) —
Attachment #182624 - Attachment is obsolete: true
Attachment #182624 - Flags: review?(kiko)
Attached patch patch, v2 (obsolete) — Splinter Review
merging the two patches from manu in a single one, per his request on IRC.
Attachment #201608 - Attachment is obsolete: true
Attachment #201609 - Attachment is obsolete: true
Attachment #201614 - Flags: review?(LpSolit)
Comment on attachment 201614 [details] [diff] [review]
patch, v2

>Index: Bugzilla/BugMail.pm

>+    my $vars = {
>+      urlbase => Param("urlbase") };

Param("urlbase") is already available from templates directly.


>+    my $template = Bugzilla->template;
>+    $template->process("email/password.mail.tmpl", $vars, \$msg)
>+      or die($template->error());

It should be "|| ThrowTemplateError($template->error());" instead of die().



>Index: template/en/default/email/password.mail.tmpl

The template name must be password.txt.tmpl.


>+To: [% mailaddress FILTER none %]

No need to filter directives as it's a txt template, not a html one.


>+ [%+ urlbase FILTER none %]userprefs.cgi

Write [% Param("urlbase") %] directly.
Attachment #201614 - Flags: review?(LpSolit) → review-
Attached patch patch, v3Splinter Review
Attachment #201614 - Attachment is obsolete: true
Attachment #201624 - Flags: review?(LpSolit)
Comment on attachment 201624 [details] [diff] [review]
patch, v3

Nit: move Bugzilla->template at the beginning of MailPassword(). Else it works fine. r=LpSolit

Unrelated comment: BugMail::MailPassword() should be removed and its code moved to createaccount.cgi.
Attachment #201624 - Flags: review?(LpSolit) → review+
Flags: approval?
Keywords: relnote
Flags: approval? → approval+
Err, this should wait for 2.24.
Flags: approval+ → approval-
Target Milestone: Bugzilla 2.22 → Bugzilla 2.24
Flags: approval- → approval?
Flags: approval? → approval+
Checked in....

Checking in Bugzilla/BugMail.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/BugMail.pm,v  <--  BugMail.pm
new revision: 1.64; previous revision: 1.63
done
Checking in Bugzilla/Config/MTA.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Config/MTA.pm,v  <--  MTA.pm
new revision: 1.5; previous revision: 1.4
done
Checking in docs/xml/administration.xml;
/cvsroot/mozilla/webtools/bugzilla/docs/xml/administration.xml,v  <--  administration.xml
new revision: 1.58; previous revision: 1.57
done
Checking in template/en/default/admin/params/mta.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/admin/params/mta.html.tmpl,v  <--  mta.html.tmpl
new revision: 1.3; previous revision: 1.2
done
RCS file: /cvsroot/mozilla/webtools/bugzilla/template/en/default/email/password.txt.tmpl,v
done
Checking in template/en/default/email/password.txt.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/email/password.txt.tmpl,v  <--  password.txt.tmpl
initial revision: 1.1
done
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Added to relnotes in bug 349423. Please let me know if I missed any critical information about this bug in the release notes.
Keywords: relnote
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: