Raised in behalf of a customer:
I have edited the below files for email customizations.
$JHOME/atlassian-jira/WEB-INF/classes/templates/email/html/issuementioned.vm
$JHOME/atlassian-jira/WEB-INF/classes/templates/email/html/issueresolved.vm
$JHOME/atlassian-jira/WEB-INF/classes/templates/email/html/issuecommentedited.vm
$JHOME/atlassian-jira/WEB-INF/classes/templates/email/html/issueclosed.vm
$JHOME/atlassian-jira/WEB-INF/classes/templates/email/html/issuecommented.vm
$JHOME/atlassian-jira/WEB-INF/classes/templates/email/html/issuegenericevent.vm
$JHOME/atlassian-jira/WEB-INF/classes/templates/email/html/issuedeleted.vm
$JHOME/atlassian-jira/WEB-INF/classes/templates/email/html/issueassigned.vm
$JHOME/atlassian-jira/WEB-INF/classes/templates/email/html/issueupdated.vm
However these dont work for batch emails , what files do i edit to get similar templates ?
Hey @Rene C. [Atlassian Support]
Batched emails use a different set of templates to the ones you would have altered.
Think this KB should show you what you need to do. You'll need to pull them out with java, edit them then repackage them and upload them overwriting the system plugin.
Worthless for batched emails since you cannot add system field's to batched emails even after multiple releases since its introduction.
Great for non-batched emails.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm not 100% on this, but from my experience customising these batch emails, there are different #if conditions you'll need to define/alter in the IssueUpdateBatcher-history.vm file.
I think the intent of this file is to bring all of those separate .vm files (as listed above) into one place on an #if, #elseif, #end basis.
For my use case I had to remove certain lines from this file to remove information from the batch email that was sent to a user. Adversely you may be able to add information in I would think.
I'm assuming your issue is probably related to the following feature request for issue fields? If you haven't already you can vote for it here:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey, @Samuel Stephens ! Thanks for sharing the document! I created this post back when batched notifications where new, and added another comment myself with the procedure to achieve it which is pretty close to what is mentioned in the document. I am not longer part of the Jira Server/Data Center team but I'm glad there is a formal document for it.
Cheers!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Rene C. [Atlassian Support] ,
We tried to edit the IssueUpdateBatcher-subject.vm template and make the necessary changes and it works for us. But now my question here is, in the below line.. may i know where the getText() function and the issue.update.batch.mail.subject resource/property are defined.
$i18n.getText('issue.update.batch.mail.subject', [$header.issueKey, $header.issueSummary])
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey,
the batcher-x.x.x.jar contains all the templates (.vm files) as well as a issue-update-batch-mail.properties which is a language property file with key=value pairs
in the above example you have to add the additional parameter in the array and then reference the value in the language property file like {2}
The variables which you can use are the following:
#* @vtlvariable name="batch" type="com.atlassian.jira.plugins.inform.api.batching.Batch" *#
#* @vtlvariable name="i18n" type="com.atlassian.jira.util.I18nHelper" *#
#* @vtlvariable name="baseurl" type="java.lang.String" *#
#* @vtlvariable name="escape" type="java.util.function.Function" *#
#* @vtlvariable name="header" type="java.lang.Object" *#
#* @vtlvariable name="fields" type="java.util.List" *#
#* @vtlvariable name="newIssueGroups" type="java.util.List" *#
#* @vtlvariable name="comments" type="java.util.List" *#
#* @vtlvariable name="commentCount" type="java.lang.Integer" *#
#* @vtlvariable name="commentMentionCount" type="java.lang.Long" *#
#* @vtlvariable name="issueKey" type="java.lang.String" *#
#* @vtlvariable name="issueUrl" type="java.lang.String" *#
#* @vtlvariable name="buildVersion" type="java.lang.String" *#
#* @vtlvariable name="currentBuildNumber" type="java.lang.String" *#
#* @vtlvariable name="commitId" type="java.lang.String" *#
#* @vtlvariable name="commitIdSha1" type="java.lang.String" *#
#* @vtlvariable name="partnerName" type="java.lang.String" *#
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I'm on the same point.
I try to use system fields like "issuetype" for the mail subject. Some of the fields are working but a lot dosn't work. Is there anywhere a list of system fields, I allready can use for batched notifications?
For excamle:
Best Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The place to look for the templates is inside 2 new plugins added in Jira 8, located in the <Jira Installation directory>\atlassian-jira\WEB-INF\atlassian-bundled-plugins:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Would you please be a little clearer about how to "open" this jar file and "find/edit" the template ?
Thank you.
[Updated]
It seems to be fully explained here:
https://confluence.atlassian.com/adminjiraserver/adding-custom-fields-to-emails-batched-notifications-968669988.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Glad you found it and yes, you can use the same procedure to repackage any jar file Jira uses, including language packs!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What I want to do, is to add the following elements in the mail subject:
I found how to do for the first one (status) => $header.issueStatus.name
But I didn't find how to do for the others..
For the custom field, I tried the two following solutions but both don't work.
#if(${customFields.get('customfield_10008').getValue()})
#set( $severity = $issue.getCustomFieldValue($customfield) )
#end
#if(${customFields.get('customfield_10008').getValue()})
#set( $severity = ${customFields.get('customfield_10008').getValue()} )
#end
The end of the file is the following:
#set( $status = $header.issueStatus.name )
#set( $emailsubject = "(${key} ${status}) ${severity}"
$i18n.getText('issue.update.batch.mail.subject', [$emailsubject, $header.issueSummary])
Some help ? :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello!
Any progress with getting system fields values?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Same here we are trying to get our to match single emails without any luck
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Join us to learn how your team can stay fully engaged in meetings without worrying about writing everything down. Dive into Loom's newest feature, Loom AI for meetings, which automatically takes notes and tracks action items.
Register today!Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.