Hi,
Good morning! I would like to use the function MIN in JIRA automation to find the minimum value of a field, between all the child issues of a parent issue.
Then I would like to use the function's result to update a field of the parent issue.
Is this possible to achieve?
I will appreciate any help
Thank you in advance!
Yes, that is possible, and...what do you mean by child issues?
If you mean the subtasks of a parent issue, they are already in a list in the parent, and so min can be used directly on that list:
{{issue.subtasks.someField.min}}
If instead you mean another parent/child relationship, like epics and other issues, please use JQL to gather the issues into a Lookup Issues result, and then use min:
{{lookupIssues.someField.min}}
The long-form of min() you showed is helpful for arbitrary lists of things in a math expression in a rule.
Kind regards,
Bill
Welcome to the Atlassian Community!
The "min" function needs you to give it a list of values to compare, so what you need to do is something like:
a = min ({{issue-1.numberfield}}, {{issue-2.numberfield}}, {{issue-3.numberfield}}, {{issue-4.numberfield}}, etc)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, I finally got the solution. Thanks!!
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.