JIRA EMAIL This Issue Question


I have been creating templates using the JETI plugin, however whenever I input the status field it only displays the status the issue is currently in. Can someone please tell me how to display the status the issue transitioned from with a red background and a strike through and the current status the issue transitioned to in green?



1 answer


This kind of diff view of changed attributes could be rendered as below (I have extracted this from the JIRA email template)


#if ($changelog)
<table class="keyvalue-table">
 #if ($changelogauthor)
 #authorlinkkey($changelogauthor.key $linkstyle)
 #elseif ($changelogmetadata.actor)
 #emailHistoryMetadataParticipant($changelogmetadata.actor, true)
 #foreach ($changeitem in $changelog.getRelated("ChildChangeItem"))
   #if ($changeitem.getString("field").equals("description"))
   #set ($changelogItemIssueDescription = $changeitem)
     <th>$textutils.htmlEncode($velocityhelper.getFieldName($changeitem, $i18n)):</th>
     #set ($oldstringKey = "oldstring") #set ($newstringKey = "newstring")
     #set ($oldText = "") 
     #set ($newText = "")
     #set ($oldText = $velocityhelper.getPrettyFieldString($changeitem.getString("field"), $changeitem.getString($oldstringKey), $i18n, ""))
     #set ($newText = $velocityhelper.getPrettyFieldString($changeitem.getString("field"), $changeitem.getString($newstringKey), $i18n, ""))
     $!diffutils.diff($oldText, "background-color:${auiErrorBackgroundColour};text-decoration:line-through;", $newText, "background-color:${auiSuccessBackgroundColour};")

Thank you, I will add this to my template and get back to you if I have any problems.

I tried copy and pasting this code into my template and it did not work. Any suggestions?

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published 7 hours ago in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

33 views 0 3
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you