Forums

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

Hello Team, I want to find the % story resolved inside an epic

Priyanka khare
Contributor
October 16, 2020

Hello Team,

If an epic has 4 stories and 2 stories are in done while other 2 are in progress we would need a percentage completion of all 4 on the basis of the status.

I am using automation for JIRA . for this I am using the below steps-

  • creating a new custom field of number type (in my case Number field)
  • creating an automation rule that:
    • is triggered whenever a story is resolved (or closed)
    • looks for the epic the story belongs to
    • for this epic, loops through each story and check how many stories are resolved
  • The next step is to calculate the field- Number type to give me the percentage count

what should be the smart value for this calculation?

 

regards

Priyanka Khare

2 answers

0 votes
Sam Harding
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 18, 2020

Hi,

A way to do this would be to utilise the Lookup Issues action:

First lookup the number of total issues in the epic with this JQL:

"Epic link" = "YOUR EPIC NAME"

The epic name here can be a lookup to the triggering issue's epic, by using {{issue.epic}}.

Then you need to save the number of these to a Create Variable component, using a variable name like "total", with this smart value:

{{lookupIssues.size}}

Then, do the same for resolved issues, by doing another lookup issues, this time with resolution to be "Done". This step must be performed AFTER the previous Create Variable step:

"Epic link" = "YOUR EPIC NAME" AND resolution = Done

Then again, save this count to a Create Variable, this time using name "resolved" , using the same as last time

{{lookupIssues.size}} 

Now, you have two variables, {{total}} and {{resolved}} which are the corresponding counts of the issues in the epic. You can now use this smart value to get back the percentage (as a float number 0.xxxxxx):

{{#=}}{{resolved}}/{{total}}{{/}}

 Hope you find this helpful
Thanks

0 votes
HS
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!
October 16, 2020

I am no expert but can suggest what I know. Unfortunately the only way i know to do this is via a plugin.

You may need to develop one of your own using webhooks API from JIRA to update a custom field on epic and update it on every story update. Or you can look for an existing plugin at marketplace who can do EPIC roll ups. Search for 'epic hierarchy' or 'epic rollup'.

Suggest an answer

Log in or Sign up to answer