I currently I have an automation setup that runs a scheduled JQL search then an sends an email with an HTML table listing all the issues and specific fields from those issues.
Current setup (Works as intended)
<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>{{#Issues}}
<tr>
<td><a href="{{url}}">{{Key}}</a></td>
<td>{{fields.issuetype.name}}</td>
<td>{{assignee.displayName}}</td>
<td>{{reporter.displayName}}</td>
<td>{{summary}}</td>
</tr>
{{/}}</table>
My question is this JQL search can contain multiple issue types, how can I take the results from the search and break it up into multiple tables that only display certain issues types?
End goal is something like this example below where I can have the option of having a table dedicated to 1 issue type and a table dedicated to select issues types and exclude the rest.
Hello @Zach
Wasnt the earlier syntax working? {{#issues}}{{#if(equals(issueType.name, "Type A"))}}
Please Note - check is case sensitive, Type A != Type a. Please use the right case.
Or, If you are wondering syntax for doing OR check, try below.
<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>
{{#issues}}
{{#if(or(equals(issueType.name, "Type C"),equals(issueType.name, "Type D")))}}
<tr>
<td><a href="{{url}}">{{Key}}</a></td>
<td>{{fields.issuetype.name}}</td>
<td>{{assignee.displayName}}</td>
<td>{{reporter.displayName}}</td>
<td>{{summary}}</td>
</tr>
{{/}}
{{/}}
</table>
If there is a different issue, please share.
Hey Kalyan,
Your answer from before did help but i was getting caught up on having multiple specific issues type on one table (which i don't think i mentioned on the previous post)
{{#if(or(equals(issueType.name, "Type C"),equals(issueType.name, "Type D")))}}
This is most likely what i needed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Kalyan Sattaluri whats the syntax for excluding issue types?
How can I make this the inverse, everything but Issue Type C and D?
{{#if(or(equals(issueType.name, "Type C"),equals(issueType.name, "Type D")))}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please try:
{{#issues}}
{{#if(not(or(equals(issueType.name, "Type A"),equals(issueType.name, "Type B"))))}}
<tr>
<td><a href="{{url}}">{{Key}}</a></td>
<td>{{fields.issuetype.name}}</td>
<td>{{assignee.displayName}}</td>
<td>{{reporter.displayName}}</td>
<td>{{summary}}</td>
</tr>
{{/}}
{{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please refer to syntax here for conditional operations. Hope it helps! Thanks.
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/#not
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Zach
Please accept answer if issue is resolved so it benefits others in the future, if still issues, please share so we can help. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It still fails
<p><b>All Issue Types except Type A and Type B</b></p>
<style>
table {border-collapse:collapse;}
table, td, th {border:1px solid black;}
table, td, th {font-family: calibri;}
th {background-color: rgb(217,217,217);color:black}
table, td {font-size:90%;height: 25px}
th {font-size:95%;}
td {text-align:center}
</style><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>
{{#Issues}}
{{#if(not(or(equals(issueType.name, "Issue Type A"),equals(issueType.name, "Issue Type B")))}}
<tr>
<td><a href="{{url}}">{{Key}}</a></td>
<td>{{fields.issuetype.name}}</td>
<td>{{assignee.displayName}}</td>
<td>{{reporter.displayName}}</td>
<td>{{summary}}</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.
There is a missing ending bracket in your current syntax.
Should be:
{{#if(not(or(equals(issueType.name, "Issue Type A"),equals(issueType.name, "Issue Type B"))))}}
Not:
{{#if(not(or(equals(issueType.name, "Issue Type A"),equals(issueType.name, "Issue Type B")))}}
Also, as I have said, this check is case sensitive.
So, Please pick an issue of "Issue Type A" and log {{issueType.name}} and share screenshot of your audit log to exactly what its called. Issue Type A != Issue type A.
Please share that log statement and also what is the error you are seeing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hope its truly working and you did not quit out of frustration :p
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
*high fives*
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Zach
Are you using Jira Cloud or Server / Data Center version?
The {{issues}} (note the plural) smart value is only documented to work for Server / Data Center. For Jira Cloud, please use the Lookup Issues action and {{lookupIssues}} smart value.
Back to your question: please try smart value, list filtering to make those sections by issue type: https://community.atlassian.com/t5/Automation-articles/Filtering-smart-value-lists/ba-p/1827588
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.