Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gene1wood/62f64b0f363102cb4408 to your computer and use it in GitHub Desktop.
Save gene1wood/62f64b0f363102cb4408 to your computer and use it in GitHub Desktop.
Patch to the Bugzilla email template to embed X- headers in a non-displaying div
From ffd15b7565277569d6bdf57f6493841dabe6a412 Mon Sep 17 00:00:00 2001
From: Gene Wood <gene_wood@cementhorizon.com>
Date: Thu, 3 Jul 2014 09:39:37 -0700
Subject: [PATCH] Adding X- header contents to the body of the email in a
non-displaying div to enable easier Gmail filtering
---
.../BMO/template/en/default/email/bugmail.html.tmpl | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/extensions/BMO/template/en/default/email/bugmail.html.tmpl b/extensions/BMO/template/en/default/email/bugmail.html.tmpl
index a6d2b34..de2d459 100644
--- a/extensions/BMO/template/en/default/email/bugmail.html.tmpl
+++ b/extensions/BMO/template/en/default/email/bugmail.html.tmpl
@@ -111,6 +111,25 @@
</ul>
</div>
+ <div id="headers" style="font-size:0px">
+ [% IF Param('useclassification') %]
+ <li>X-Bugzilla-Classification: [% bug.classification %]</li>
+ [% END %]
+ <li>X-Bugzilla-ID: [% bug.id %]</li>
+ <li>X-Bugzilla-Product: [% bug.product %]</li>
+ <li>X-Bugzilla-Component: [% bug.component %]</li>
+ <li>X-Bugzilla-Version: [% bug.version %]</li>
+ <li>X-Bugzilla-Keywords: [% bug.keywords %]</li>
+ <li>X-Bugzilla-Severity: [% bug.bug_severity %]</li>
+ <li>X-Bugzilla-Who: [% changer.login %]</li>
+ <li>X-Bugzilla-Status: [% bug.bug_status %]</li>
+ <li>X-Bugzilla-Resolution: [% bug.resolution %]</li>
+ <li>X-Bugzilla-Priority: [% bug.priority %]</li>
+ <li>X-Bugzilla-Assigned-To: [% bug.assigned_to.login %]</li>
+ <li>X-Bugzilla-Target-Milestone: [% bug.target_milestone %]</li>
+ <li>X-Bugzilla-Flags:[% FOREACH flag = bug.flags %] [%+ flag.name %][% flag.status %][% END %]</li>
+ <li>X-Bugzilla-OS: [% bug.op_sys %]</li>
+ </div>
</body>
</html>
--
2.0.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment