Forums

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

Automation rule to Sum up Completed Story Points in an epic by custom status

christopher_branaman June 27, 2024

 

 

Company Managed/Cloud

I created a new field called Points Complete.

Whenever a card is moved to Done, I would like to see this field in the Epic populated with the total story points of completed cards.

Here's the rule I created -

When: Value changes for Status

Issue Type does not equal Epic

Condition And: Parent exists

Then: Lookup issues
parent = {{triggerIssue.parent.key}} AND statusCategory = "Done"

Branch

For: Parent

Then: Edit issue fields

Choose fields to be set = Points Complete
{{lookupIssues.Story Points.sum}}

 

The Automation is working exactly as it should, however I would like to filter the results a bit more.

Example: the current formula is looking for statusCategory = "Done"

This in turn is pulling all combined cards that would equate to a Done value (.e.g. Cancelled, Duplicate, Not A Bug, etc).

Is it possible to query by custom Status value so that those others mentioned above are not being included?? Or if I wanted to include one of the "In Progress" statuses as well as done, such as cards in the Product Review column?

 

1 answer

1 accepted

1 vote
Answer accepted
Trudy Claspill
Community Champion
June 27, 2024

Hello @christopher_branaman 

Yes, if you want your query to be based on individual statuses rather than status category change it thus:

parent = {{triggerIssue.parent.key}} AND status in (<comma separated list of individual status values>)

christopher_branaman June 27, 2024

I edited to the following

parent = {{triggerIssue.parent.key}} AND status in "Done, Product Review"

And it failed.

Screenshots attached (including the Audit Log)

Screenshot (99).pngScreenshot (100).png

christopher_branaman June 27, 2024

Figured it out.  It was successful using the following:

 

parent = {{triggerIssue.parent.key}} AND status in ('Done', 'Product Review')

Trudy Claspill
Community Champion
June 27, 2024

Your JQL syntax is incorrect. The comma separated list of Status values needs to be enclosed in parentheses.

parent = {{triggerIssue.parent.key}} AND status in ("Done, Product Review")

christopher_branaman July 9, 2024

I disagree. I tried it the way you presented it above and it failed.

The query I listed above is working without issue.

Trudy Claspill
Community Champion
July 9, 2024

I think my reply and your "figured it out" reply posted at the same type, because I was referring to the JQL you had in your original post.

parent = {{triggerIssue.parent.key}} AND status in "Done, Product Review"

But I see I also had a typo in my reply. The parentheses needed to be added, the quote marks surrounding both values removed, and quote marks added around just the Product Review value. You don't need quote marks around a value that doesn't include spaces, but it doesn't hurt to have them.

I had intended my reply to have the this JQL similar to what you posted in your "figured it out" response.

parent = {{triggerIssue.parent.key}} AND status in (Done, 'Product Review')

 

My apologies for the confusion.

christopher_branaman July 9, 2024

No problem at all. Thank you for your responses!

 

Suggest an answer

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

Atlassian Community Events