Using automation in jira, I would like to generate an email with a list of issues in a released version.
I want to have a list of bugs and a list of features in one single email.
I was trying to use the lookUp Table key:value pair like this:
New Features
<ul>
{{#issueTypes.get("Features")}}
<li><a href="{{url}}">{{Key}}</a> - {{summary}} - {{issueType.name}}
</a></li>{{/}}
</ul>
But this doesn't work. It only works for lookUpIssues but I can't sort by issue type.
Is it possible to take a released version and generate an email that orders the list by issue types?
Hello @Gil Levy
Can you please share why are you not using lookupIssues for this?
Also, Can you clarify what do you mean by "sort" by issue type? Do you want to order Features first and then bugs? OR, Do you want to show a list of Features first and then in a different table, show bugs?
Because lookupIssues just dumps all the list of issues.
What I was trying to achieve in the email is ordered lists by issue type. For examples:
Bug Fixes
[list of Jira bugs that were released in version 1.0]
New Features
[List of Jira stories that were released in version 1.0]
I couldn't figure out how to achieve this with lookupIssues.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Gil Levy
You can filter lookupIssues data like below:
Bug Fixes
<table border="1">
<tr>
<th style="width:100px">Key</th>
<th style="width:150px">Issue Type</th>
<th style="width:150px">Assignee</th>
<th style="width:150px">Reporter</th>
<th style="width:1000px">Summary</th>
</tr>
{{#lookupIssues}}
{{#if(equals(issueType.name, "Bug"))}}
<tr>
<td><a href="{{url}}">{{Key}}</a></td>
<td>{{fields.issuetype.name}}</td>
<td>{{assignee.displayName}}</td>
<td>{{reporter.displayName}}</td>
<td>{{resolved}}</td>
</tr>
{{/}}
{{/}}</table>
-----------------------------------------------------------------
New Features
<table border="1">
<tr>
<th style="width:100px">Key</th>
<th style="width:150px">Issue Type</th>
<th style="width:150px">Assignee</th>
<th style="width:150px">Reporter</th>
<th style="width:1000px">Summary</th>
</tr>
{{#lookupIssues}}
{{#if(equals(issueType.name, "Feature"))}}
<tr>
<td><a href="{{url}}">{{Key}}</a></td>
<td>{{fields.issuetype.name}}</td>
<td>{{assignee.displayName}}</td>
<td>{{reporter.displayName}}</td>
<td>{{resolved}}</td>
</tr>
{{/}}
{{/}}</table>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please note, check is case sensitive. Feature != feature. So please make sure its spelled how its on screen.
if any issues with syntax, please let me know. I just copy/pasted from my other post. Hope it helps. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Kalyan Sattaluri amazing!!! I didn't know it was possible. It works!
I did change the <td>{{resolved}}</td> to <td>{{issue.summary}}</td> but that comes up empty.
Additionally, this is unrelated, but I get this email twice... one for each issue type.
I assume it's because I use a branching rule:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, in fact, it would send email for each issue in the version. I dont think you want that.
Just include your lookup and email step as part of regular main branch and delete the branch logic all together.
Please verify and let me know if any concerns.
if looks good, please consider accepting answer so others can benefit.
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also, you need to reference it as simply {{summary}} because in the context of {{looupIssues}}, {{issue.summary}} will resolve to NULL.
So once you change <td>{{resolved}}</td> ==> <td>{{summary}}</td> it will work.
*sorry, this was a carry over of me tweaking response for previous post..
Hope it helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I cannot delete the branch because I also have to transition them from Done to a Released status (long story... it has to do with poor integration with Intercom).
Automation forces me to either use a JQL or a branching rule.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK. Then I would suggest that inside the branch, just transition the issue. Dont send email yet..
Then come outside of the branch and do lookup and send email..
This way you are only sending1 email.
Regarding => {{summary}} outputs data and time.
Maybe your "Summary" field is called different?
May have to cross check name of what field you are looking to populate..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, this is working now as you said, and the summary field is working too.
Is there a way to minimize the gaps in the email?
<h3>The list of issues released in version {{version.name}}:
</h3>
Bug Fixes
<table border="1">
<tr>
<th style="width:100px">Key</th>
<th style="width:150px">Issue Type</th>
<th style="width:150px">Reporter</th>
<th style="width:1000px">Summary</th>
</tr>
{{#lookupIssues}}
{{#if(equals(issueType.name, "Bug"))}}
<tr>
<td><a href="{{url}}">{{Key}}</a></td>
<td>{{fields.issuetype.name}}</td>
<td>{{reporter.displayName}}</td>
<td>{{summary}}</td>
</tr>
{{/}}
{{/}}</table>
-----------------------------------------------------------------
New Features
<table border="1">
<tr>
<th style="width:100px">Key</th>
<th style="width:150px">Issue Type</th>
<th style="width:150px">Reporter</th>
<th style="width:1000px">Summary</th>
</tr>
{{#lookupIssues}}
{{#if(equals(issueType.name, "Story"))}}
<tr>
<td><a href="{{url}}">{{Key}}</a></td>
<td>{{fields.issuetype.name}}</td>
<td>{{reporter.displayName}}</td>
<td>{{fields.summary}}</td>
</tr>
{{/}}
{{/}}</table>
Jira Automation
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hmm. I am not sure of this spacing. I have observed that sometimes email clients also render these emails differently. Same email looks different in native outlook client vs web outlook client vs other providers like Gmail.
If so, you can remove HTML formatting and maybe try other plain text ways..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Gil Levy ,
From my understanding of your request, it seems that you can achieve it with the "Notification Assistant for Jira" plugin:
It allows to create templates and modify them according to your needs, even with issue lists.
Hope it helps.
Cheers,
Victor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.