Forums

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

Structure Question - Finding story points for children of a certain issueType and certain status

mattics phi September 19, 2023

Hi!  Quick question!  What I am trying to do is make a formula where I count all the children that are missing story points writing that total count in a sentence.  I then display the total count at the Epic level.

"xx out of zz" where xx is the children that are missing story points and zz is the total children.  Currently, what I have below in the code block is working but it counts children of ALL issuetypes and ALL statuses.

My question is this: how can I filter out for status = open and issueType = story? 

If there is a better way of writing this out, please let me know!  This is my first time using structures

 

if issuetype = "Epic":
if (COUNT#children{"Story Points"} - COUNT#children{columnSP} == 0):
"All stories are pointed"
else :
concat(COUNT#children{"Story Points"} - COUNT#children{columnSP}; " out of "; COUNT#children{"Story Points"})

columnSP = column that displays the number of stories that have story points

1 answer

1 accepted

0 votes
Answer accepted
Stepan Kholodov _Tempo_
Community Champion
September 29, 2023

Hello @mattics phi 

You can try a formula like this:

if issuetype = "epic":

if sum#children{if issuetype = "story" and status = "open" and storypoints: "1"} = sum#children{if issuetype = "story" and status = "open": "1"} : "All stories are pointed" else
concat(sum#children{if issuetype = "story" and status = "open": "1"} - sum#children{if issuetype = "story" and status = "open" and storypoints: "1"}, " out of ", sum#children{if issuetype = "story" and status = "open": "1"})

It will do the following for every Epic:

- count how many Stories in the 'Open' Status each Epic has;
- count how many of such Stories have Story Points;
- return either 'All stories are pointed' if both parameters match or 'X out of Y' when only X Stories have Story Points out of Y Stories overall.

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

Best regards,
Stepan Kholodov
Tempo

mattics phi October 12, 2023

Thank you!  Sorry, I was on PTO.  It looks complex but it works, thank you so much!

 

Because of the complexity, I made some support columns to help me calculate the same: filterForStatus and filterByIssueKey.  I would use these columns in the calculation that I posted in the OP!

 

filterForStatus

if JQL {issueType = Epic} :
count#strict{
if JQL {status in ("Cancelled", Closed)}: 1 }

 

filterByIssueKey

if JQL {issueType = Epic} :
count#strict{
if JQL {issueType in ("Task", "Sub-task")}: 1 }

 

Like Stepan Kholodov _Tempo_ likes this

Suggest an answer

Log in or Sign up to answer