Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Scenario

You want to prefix incoming email content processed by JEMH, either issue description during create or a comment.

...

Any TemplateSet can be edited and customized, the default and advanced are shown below:

Default

Detailed

Image RemovedImage Added

Image RemovedImage Added

The comment header template can be previewed by entering a valid issue key into the Preview Context Issue Key box and then pressing the icon under the comment header text field.

Once a Comment Header TemplateSets has been created, they are referenced through individual Configuration Profile > Email > Templates:

...

To select a comment header, edit the Email section within the relevant Profile by clicking on the pen icon

...

Create Test Case

Created Test Case

Test Case Execution Result

Image RemovedImage Added

Image RemovedImage Added

Here is the detailed header used in the example, prefixing the description of the issue:

...

Code Block
#if ($!issue)
	WE ARE IN ISSUE COMMENTING MODE
#else
	WE ARE IN ISSUE CREATING MODE
#end


Context

The Context is available for review at edit time, you can use it to link off to Javadoc for Jira API objects as needed - our jemhUtils class is also available, exposing things like the mailbox catchEmailAddress.

context variable

Data Type

Description

message

javax.mail.Message

the raw message object

subject

java.lang.String

the Subject text

jemhUtils

http://ppl-docs.s3-website-us-east-1.amazonaws.com/JEMH/4.1.0/com/javahollic/jira/emh/api/IJEMHVelocityContextUtils.html

JEMH Helper class

$jemhUtils.getCatchEmailAddress().getAddress()

java.lang.String

The Mailbox catchEmailAddress

toAddresses

javax.mail.InternetAddress[]

the to: addressees

ccAddresses

javax.mail.InternetAddress[]

the cc: addressees

bccAddresses

javax.mail.InternetAddress[]

the bcc: addressees (don't expect many here!)

allAddresses

javax.mail.InternetAddress[]

all addressees

body

java.lang.String

the post processed (html > markup) content – :warning: since JEMH 2.7.36 for Jira 7.10.x

Filter by label (Content by label)
showLabelsfalse
max5
spacesJEMH
sortmodified
showSpacefalse
reversetrue
typepage
cqllabel in ( "macro" , "template" , "notification" , "velocity" ) and space = "JEMH"
labelsevent listener jemh issue notification

...