Hello,
I am using the #lookupIssues function in a Jira automation where Parent={{issue.key}} to return a list of child issues upon creation. The following automation works great at grabbing those issues and hyperlinking them; however, the list creates the issue numbers in reverse chronological order. Is there a way to reorder these in chronological order.
Automation for Send email: (smart value used in email body)
{{#lookupIssues}}
<li><a href="{{url}}">{{key}}</a> - {{summary}}</li>{{/}}
Returns results:
XYZ - 9
XYZ -8
XYZ -7 ....etc.
I want: (based on associated child issues)
XYZ - 1
XYZ - 2...etc.
Thank you for your time,
Amanda
Hi @Amanda Crawford -- Welcome to the Atlassian Community!
Please try adding the ORDER BY keywords to the JQL for your Lookup Issues action, selecting the order you want. For example:
project = myProject ORDER BY Key ASC
When there is no ORDER BY on a JQL expression, I would hypothesize the returned issue order to be unknown (and subject to the implementation of JQL or randomness).
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.
Hello @Amanda Crawford
In your lookupIssues JQL, just append ORDER BY Created ASC
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.
Hello,
Do you know how I would write that? Would I do it just as you have written it?
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yes, if your lookupIssues JQL is:
issuetype = Bug and status != Closed
Then just add order by clause to end like below:
issuetype = Bug and status != Closed ORDER BY Created ASC
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.