I would like the version-release functionality to trigger an email to our cloud-ops team to give them a list of all the issues - I tried to set this up, but it sent ONE email per issue, which is non-intuitive if the trigger is the release closing.
As others have mentioned, you would use the Lookup issues action, with the jql
fixVersion = {{version.id}}
The rule itself will look pretty simple:
Then you would use the {{lookupIssues}} smart value to return the list of issues in your email and format the output to display the list how you'd like. For example, these will all return a simple list of issue keys; the first two would output a continuous list separated by semicolons, and the last one would be separated by line breaks:
{{lookupIssues.key.join("; ")}}
{{#lookupIssues}}{{key}}{{^last}}; {{/}}{{/}}
{{#lookupIssues}}
{{key}}
{{/}}
(also check out Jira smart values - lists for more ways to use smart values with lists)
You can also use html to display the list in ways that are easier to read. This will output a bulleted list of issues with the issue properties separated by semicolon and the key as a link:
<p>Issues released in {{version.name}}</p>
<ul>
{{#lookupIssues}}
<li><a href="{{url}}">{{key}}</a>: {{issueType.name}}; {{summary}}; {{status.name}}; {{resolution.name}}</li>
{{/}}
</ul>
But my preferred option is to format it as a table; it's the easiest to read and more aesthetically appealing IMO:
<p>Issues released in {{version.name}}</p>
<p></p>
<table cellspacing="1" cellpadding="5" border="0" bgcolor="#aaaaaa">
<tr bgcolor="#ffffff">
<th>Issue</th>
<th>Type</th>
<th>Summary</th>
<th>Status</th>
<th>Resolution</th>
</tr>
{{#lookupIssues}}
<tr bgcolor="#ffffff">
<td><a href="{{url}}">{{key}}</a></td>
<td>{{issueType.name}}</td>
<td>{{summary}}</td>
<td>{{status.name}}</td>
<td>{{resolution.name}}</td>
</tr>
{{/}}
</table>
If you do use html to format, make sure you uncheck "Convert line breaks to HTML line breaks" and use <p> and <br> tags; otherwise, Automation will add an extra line break between each issue.
It would help to see the rule you tried to use.
In general, to solve your use case, your rule would use the details outlined here.
I suspect you've already got that much figured out though.
Sending an email in the branch/loop will indeed send one email per issue.
What it sounds like you really want is to aggregate that into some text, and then send that text out after the branch/looping in a single email. I'll offer two ideas.
_ _ _ _ _ _ _
Using the Lookup issues action will result in a smart value listing at most 100 issues that match the JQL. I believe the list.join() smart value function can aggregate such a list into a single text variable. If all you want is a list of issue keys, that might do it.
If you're looking for something fancier, like an HTML formatted table of issue keys and descriptions -- frankly I'm not sure Automation can do it today.
_ _ _ _ _ _ _
Unfortunately, the current state of Jira Automation isn't great at this type of "aggregation" task. One problem is that the looping executes in multiple parallel branches, causing non-determinism problems. Trying to "build up" a smart value in the loop and use it after the loop simply won't work. This is a known limitation of Automation in Jira as of today.
A possible workaround would be to try to accumulate the text in a text field external to the rule -- examples: in the Description field of a single issue, or as an entity property.
I haven't done this, and have concerns that the non-determinism might continue to be a problem with these approaches. If using an issue, liberal use of the "Re-fetch issue data" action might help.
_ _ _ _ _ _ _
Has anyone else come up with a trustworthy workaround to aggregate data like this from the result of an issue query?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @zzalowitz
Yes, and...to what Mykenna suggests:
Are you using Jira Cloud or Server/Data Center?
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.
@zzalowitz if you haven't looked at the Atlassian marketplace yet, there are a bunch of apps surrounding release notes which should do the desired thing fairly easily.
PS - I am the Product owner of one such app Automated release notes for Jira. And if you are on cloud version, there is a free variant as well.
Best,
Anand
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I will attest to the power of ARNfJ - it's awesome. Used it at a prior startup.
Not only did it help use scale our solution for multiple team's individual needs, I was able to focus on just the standards, and delegate to any developer or Product Owner doing the release (we had various internal / external scenarios).
We also used it to auto-create Confluence pages of the same information, with two different templates: internal kept the hyperlinks to issues and was basic formatting. External (public accessible Space) was fancy, no hyperlinks, and extra fields to explain the basic change to the customer.
We didn't get to a point of integrating with CI/CD, but we could have.
Only reason we don't use it know is we have a dedicated Technical Documentation team (but I still think they would benefit).
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.