Forums

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

STRUCTURE-BOARD: Run function on children elements

Lance Rodrigues
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 1, 2023

I have setup a structure board that...

  1. Inserts epics based on some criteria
  2. Extended to include all its stories and children

 

I would like to ...

Create a formula that can "Provide me a status "delayed" based on multiple criteria of the #children". Something like 

statuses = //for each child
WITH storyType = child.issuetype:
WITH status = child.status.name
IF storyType = "Architecture" AND status = "DONE" : Completed
IF storyType = "Architecture" AND status = "IN_PROGRESS" : In_Progress


// outer function
IF ANY(statuses, (status -> status = "IN_PROGRESS")) : In_Progress
Else : Completed


Apologies my above syntax may not be correct but what I am trying to figure out is how can I get access to all the fields in the child elements of my epic. 

I found aggregate options like values#children("someField") which gives me an array of someField but what I would like is the ability to run a function on values#children. 

I apologise as this maybe a very beginner query and any help would be appreciated. 

1 answer

0 votes
Stepan Kholodov _Tempo_
Community Champion
September 4, 2023

Hello @Lance Rodrigues 

You can try a formula like this:

with status_ = if status = "in progress": "in progress" else
if status = "done": "completed":

if issuetype != "epic": status_ else

if issuetype = "epic" and sum#strict{if status = "in progress": "1"} >0 : "in progress" else
"completed"

The formula will:
- check individual statuses of sub-issues of Epics and return either 'in progress' or 'completed';
- return 'in progress' for each Epic that has at least one sub-issues that is 'in progress' or return 'completed' if no sub-issues are 'in progress'.

I hope this helps. If you need further assistance, please reach out to us directly at our support portal.

Best regards,
Stepan Kholodov
Tempo

Suggest an answer

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

Atlassian Community Events