Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,552,203
Community Members
 
Community Events
184
Community Groups

What files do I edit to change batched notification templates?

Edited
Rene C_ _Atlassian Cloud Support_
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 20, 2019

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 ?

2 answers

1 accepted

0 votes
Answer accepted

Hey @Rene C_ _Atlassian Cloud 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.

https://confluence.atlassian.com/adminjiraserver085/customizing-email-content-batched-notifications-981155469.html

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.

Like Samuel Stephens likes this

Hi @Kevin Dalton 

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:

https://jira.atlassian.com/browse/JRASERVER-70206

Rene C_ _Atlassian Cloud Support_
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 30, 2023

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!

rohit_mat
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Apr 13, 2023

Hey @Rene C_ _Atlassian Cloud 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])
0 votes
Rene C_ _Atlassian Cloud Support_
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 20, 2019

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:

  • Jira inform - batchers: com.atlassian.jira.plugins.inform.batchers (batchers-1.0.23.jar)
  • Jira inform - batching plugin: com.atlassian.jira.plugins.inform.batching-plugin (batching-plugin-1.0.23.jar)

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

Rene C_ _Atlassian Cloud Support_
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Apr 24, 2019

Glad you found it and yes, you can use the same procedure to repackage any jar file Jira uses, including language packs!

Like Joffrey_Hamman likes this

What I want to do, is to add the following elements in the mail subject:

  • status
  • type
  • component
  • customfield_10008

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 ? :)

Like # people like this

Hello!

Any progress with getting system fields values?

Like # people like this

@Joffrey_Hamman 

Hello

I am also trying same. Any update on this ?

Same here we are trying to get our to match single emails without any luck

Suggest an answer

Log in or Sign up to answer