Additional variables for Mail Notification template

RESOLVED WORKSFORME

Status

()

--
enhancement
RESOLVED WORKSFORME
10 years ago
9 years ago

People

(Reporter: misc, Unassigned)

Tracking

Details

Attachments

(2 attachments)

(Reporter)

Description

10 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5
Build Identifier: Latest CVS as of 2009-01-19

Many of the bug fields are available for use in the Mail Notification template (newchangedmail.txt.tmpl), but some are missing.

Below shows context diff with the ones I have added to my install and would like added upstream to official source.

Thanks.

Index: Bugzilla/BugMail.pm
===================================================================
RCS file: /cvsroot/mozilla/webtools/bugzilla/Bugzilla/BugMail.pm,v
retrieving revision 1.124
diff -c -r1.124 BugMail.pm
*** Bugzilla/BugMail.pm 1 Jan 2009 23:24:38 -0000       1.124
--- Bugzilla/BugMail.pm 19 Jan 2009 17:35:34 -0000
***************
*** 662,667 ****
--- 662,671 ----
          changername => $values{'changername'},
          reporter => $values{'reporter'},
          reportername => Bugzilla::User->new({name => $values{'reporter'}})->name,
+         qacontact => $values{'qa_contact'},
+         qacontactname => Bugzilla::User->new({name => $values{'qacontact'}})->name,
+         cc => $values{'cc'},
+         resolution => $values{'resolution'},
          diffs => $diffs,
          threadingmarker => build_thread_marker($id, $user->id, $isnew),
      };



Reproducible: Always

Steps to Reproduce:
1. Attempt to use in newchangedmail.txt.tmpl : qacontact, cc, resolution, etc.
2.
3.
Actual Results:  
null

Expected Results:  
Replacement of template token with actual value from bug
Please attach patches as an attachment.
(Reporter)

Comment 2

10 years ago
Created attachment 357747 [details] [diff] [review]
Patch to 3.0.3 BugMail.pm to create additional variables for newchangedmail.txt.tmpl

This is the patch I am currently using with my 3.0.3 Bugzilla install.
(Reporter)

Comment 3

10 years ago
Created attachment 357748 [details] [diff] [review]
(Proposed) Patch to *latest* BugMail.pm to create additional variables for newchangedmail.txt.tmpl

I have created a patch that would apply to the latest BugMail.pm file.
I have not tested this as I only have a 3.0.3 install.
Really we should just be passing bug objects to the template...

Comment 5

9 years ago
We don't need more variables passed to the email template. Bugzilla 3.8 now pass the bug object directly, see bug 395451.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.