Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JIRA 8.5.4 Batch Email modification Help

AndreH
Contributor
April 30, 2020

Hi,

We just upgraded to JIRA 8.5.4 and I need some assistance with modifying the Batch email vm files.

1. I need to add several OOTB fields to the batch email templates.

2. I can't find any information how to add OOTB fields to the IssueUpdateBatcher-content.vm. I need to have both OOTB fields and Custom fields in the Issue Update section.

I have found Atlassians document -
https://confluence.atlassian.com/adminjiraserver/adding-custom-fields-to-emails-batched-notifications-968669988.html
This is suppose to allow you to add Custom fields, however none of the added custom field have worked.

3. The last requirement is to add the Parent Issue URL and information for Subtasks. I have working code for regular VM files, however the new Batch files, it just doesn't work. Anyone have any idea how to get this information in batch emails?

Subtask (Parent URL Code 1 of 2) -Issuemention.vm
#if ($issue.isSubTask())

#rowWrapperNormalBegin('' 'wrapper-special-margin')

<table class="keyvalue-table">

#parse('templates/email/html/includes/fields/ParentIssueURL.vm')

</table>

#rowWrapperNormalEnd()

#end

Subtask (Parent URL Code 2 of 2) -ParentIssueURL.vm
#disable_html_escaping()

<tr>

<th>#text("Parent Issue"):</th>

<td><a href="${baseurl}/browse/${issue.getParentObject().getKey()}">($issue.getParentObject().getKey()) $textutils.htmlEncode($issue.getParentObject().getSummary())</a></td>

</tr>

 

Thanks in advance,

Andre

2 answers

0 votes
Alejandro Reyes July 20, 2020

I have the same problem, I would like to add the parent issue name and link to the subject and the body of the issue, but cannot manage to get the values propperly, as the $header variable of the context only returns string values of the current issue and don't the specific issue object to get the propper values.

I'm looking that exists an EmailIssue class that may be useful, but i don't know if it will work, i'll inform you when I have tested myself.

0 votes
Boris Berenberg - Atlas Authority
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 30, 2020

In the context of a summary email, a given issue object likely doesn't work the way you expect.

Though I think you could do this kind of thing in Notification Assistant for Jira (which we make).

Suggest an answer

Log in or Sign up to answer