How do I add a custom field to the automatic emails created by JEMH

Scott Langlois October 24, 2012

I have the custom field I want to add the field to the email and make the hyperlink that is sent not a hyperlink just and ID?

1 answer

0 votes
Andy Brook [Plugin People]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 24, 2012

Im not clear on the circumstances of where the CF is created, and when it is to be included/converted?

If you are trying to add a specific field to the email, you need to modify a velocity template. You have two choices here, either (a) Use core JIRA notifications and modfiy core JIRA templates (and restart JIRA every time), or (b) Use JEMH IssueListener and JIRA notifications (that selects the JIRA notification scheme, rather than the project doing so) and TemplateSets to customize the content (no restart needed).

Scott Langlois October 24, 2012

I am evaluating JEMH, what I want to do is modify the velocity template to have some of the custom fields I created sent with the automated email that JEMH is sending. I have never worked with velocity before and it is not a language that I have been able to quickly pickup unlike other programing languages.

Andy Brook [Plugin People]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 25, 2012

OK, Velocity is pretty simple, its not a programming language, mostly its concerned with getting values of its 'context' (environment variables if you like), and injecting them into the template.

There is some background reading to be done:

- http://velocity.apache.org/engine/devel/user-guide.html (I refer to this often)

- https://confluence.atlassian.com/display/JIRA/Customising+Email+Content

- https://answers.atlassian.com/questions/82337/jira-e-mail-template-customfield-options

All standard velocity context parameters are available in JEMH TemplateSets.


See the following tutorial for how to get non-jira users notified by email. It goes through the creation of a custom IssueEvent TemplateSet, and the configuration of the JEMH IssueListener required to broadcast the notification. The process of configuring Non-JIRA user notification is similar to JIRA user notification. The key thing to note is that if JIRA user notification is required, then the JIRA Project must have their 'notification scheme' selection disabled to stop duplicate notifications.

https://studio.plugins.atlassian.com/wiki/display/JEMH/Enable+non+JIRA+Account+holders+to+receive+issue+updates

If you need specific support to work through the configuration after reviewing the above, please raise an issue: https://studio.plugins.atlassian.com/browse/JEMH

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events