Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Find the minimum value of a field using the function MIN in JIRA Automation

Mario Palacios Fernández
Contributor
August 28, 2023

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?

image.png

I will appreciate any help

Thank you in advance!

 

 

 

3 answers

2 accepted

1 vote
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 28, 2023

Hi @Mario Palacios Fernández 

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

0 votes
Answer accepted
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 28, 2023

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)

0 votes
Mario Palacios Fernández
Contributor
October 26, 2023

Hi, I finally got the solution. Thanks!!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events