Goal is to compute percent complete for Sprint Story points
Asked by Dipen:

Team

I have 2 rules

1. that gives me the total # of story points for all issues within a Sprint after the Sprint ends and

2. that gives me the # of story points for all issues that are in Done status after the Sprint ends

I am trying to compute the percent complete using this formula

% complete (at the end of Sprint) = Story points estimate completed/Total Story points estimate

Here's what I have an automation rule crafted so far, but have not had success with computing the percent complete

![Screenshot 2024-07-01-174820.png](https://community.atlassian.com/t5/image/serverpage/image-id/332878i5A3608F218E03188/image-size/large?v=v2&px=999 "Screenshot 2024-07-01-174820.png")

Any pointers would be greatly appreciated

There are no errors when the rule runs.

But the email simple outputs the formula. not the computed values

Thanks

KD


Answers:
author: Bill Sheboy
body: Hi [@Dipen](/t5/user/viewprofilepage/user-id/5462529)

This is a frequent question in the community, and you may calculate the percentage complete (by story points) using one Lookup Issues action and no Created Variables for intermediate steps. To do this, please see this earlier post:

<https://community.atlassian.com/t5/Automation-questions/Re-Calculating-percent-complete-based-on-story-point-wei/qaq-p/2624238/comment-id/9570#M9570>

In your case, you are using a team-managed project, so substitute the smart value **Story point estimate** rather than **Story points** in the expression.

Kind regards,  
Bill


author: Trudy Claspill
body: Hello [@Dipen](/t5/user/viewprofilepage/user-id/5462529)

What are the details of your second Create Variable action.

What are the details of the Send Email action?

Add Log actions before the Send Email action to print the values in your variables into the Audit Log.

<https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Log-action>

Variables store their data as strings. You may need to convert the strings to numbers when you use them in your formula.

<https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/#asNumber>

comments: author: Dipen
body: Trudy

Here are the responses to the questions you posted in the message

1.details of your second Create Variable action.

![Screenshot 2024-07-01-2nd-variable.png](https://community.atlassian.com/t5/image/serverpage/image-id/332886i9DC575CAA99418F5/image-size/large?v=v2&px=999 "Screenshot 2024-07-01-2nd-variable.png")

2.details of send email action

![Screenshot 2024-07-01-sen-email-details.png](https://community.atlassian.com/t5/image/serverpage/image-id/332887i75B2842268237C29/image-size/large?v=v2&px=999 "Screenshot 2024-07-01-sen-email-details.png")

Working on log Actions.

Will update you shortly on that

Thanks

KD


author: Trudy Claspill
body: Your syntax in your email is also incorrect. You need to treat those variables like Smart Values, with curly brace surrounds and following the required syntax for using math expressions with Smart Values.

<https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/>

In addition, you might need to convert them using the asNumber function, as I mentioned in my previous response.


Tags: cloud

jira-cloud