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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Changes made to email templates doesn't work

In our Jira instance we needed to modify Subjects for Jira notifications for several projects.
We modified files in atlassian-jira\WEB-INF\classes\templates\email\subject, and tested then on Staging instance, where they worked as intended. (for that i used this article)
But they don't work on Prod instance. Can you please help to investigate what's the problem?

The code in most of them looks something like this:

#if ($issue.Project.key == "PROJ1" || $issue.Project.key == "PROJ2" || $issue.Project.key == "PROJ3" || $issue.Project.key == "PROJ4")
#if ($issue.issueType.name == "Bug")
#set ($emailIssueType = "Bug")
#elseif ($issue.issueType.name == "Epic")
#elseif ($issue.issueType.name == "Story")
#set ($emailIssueType = "Story")
#elseif ($issue.issueType.name == "Task")
#set ($emailIssueType = "Task")
#elseif ($issue.issueType.name == "Sub-task")
#set ($emailIssueType = "Sub-T")
#else
#set ($emailIssueType = "")
#end
#if ($issue.Priority)
#set ($emailPriority = "[P" + $textutils.left($issue.Priority.name,1) + "]")
#else
#set ($emailPriority = "")
#end
#set($joinCom = "")
#foreach($com in $issue.ComponentObjects)
#set($joinCom = $joinCom + "[" + $com.name + "]")
#end
[U][$emailIssueType][$textutils.left($issue.Status.name,12)]$emailPriority $eventTypeName: ($issue.key) $issue.summary $joinCom
#else
#disable_html_escaping()
($issue.key) $issue.summary
#end

1 answer

0 votes

Hi @Viktor Lytvyn 

As written in the document it is not recommended to modify the vm files, these modifications have to be tracked and reapplied after future upgrades.

In case you still want to do it. Did you restart your production after making these changes. I think you have to set one property to avoid restart, check the document.

Also by any chance you have ScriptRunner for Jira? You can also use it to send custom emails.

Ravi

We did restart our prod instance several times.
It looked more like notifications didn't meet if condition at the start of script

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you