I would like to know if there is a way I can automate the sum of story points for each issue under the epic?
For example, if I have a task and a bug card each worth 2 story points each, can this be totaled on the epic (parent) level to read 4?
If not possible for all issues, can this be done for tasks only under the epic (not subtasks)?
Hope this makes sense to more experiences users.
Many thanks
@hassan_ahmed you can do this with Automation rules with the following rule, assuming you are using Jira Cloud:
Whenever the Story Points field changes, branch the rule for the related Epic and then sum all the Story Points for issues belonging to the Epic.
The following screenshot show how this would look:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
trying to create the same rule but couldn't get this lookup Issue component, is there any other alternative for this.
Can refer the following screenshot of my rule.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Mohini Chandwani Hi Mohini.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Even after removing the "If" condition didn't get the option of "lookup issues".
Is this related to scope or access?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Mohini Chandwani I see you tagged your original question as Cloud, however your screenshot suggests you're using the Server version.
Unfortunately the Lookup issues action is not yet available on the Server version.
This can be achieved in the Server version using a Send web request to query the Jira Software REST API in place of the Lookup issues action.
In the following rule, I'm using a web request to the same Jira instance using the Webhook URL: {{baseUrl}}/rest/agile/1.0/epic/{{issue.key}}/issue?maxResults=100 where {{issue.key}} is referring to the Epic in the branch rule.
You also need to set the Authorization header using base64-encoded credentials of a user with access to the project.
Additionally, you need to select the Wait for response option.
The final piece of the puzzle is to use the response from the web request to sum up the story points into the Epic.
In my instance, the custom field id of the Story Points field is customfield_10106.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I have tried the same, but it throws the error - Response HTTP status : 500 and same Webhook URL run in the browser and getting the data.
And in header I have provided Authorization and encoded {username:password}, other steps are same but still the same error.
Thank you for your valuable suggestions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Mohini Chandwani The only thing I can suggest is to make sure the {{baseUrl}} is what you expect it to be (you can do this using the Log action component).
It can happen depending on how your instance and any proxies are configured, that you may need to use http://localhost:8080 instead of {{baseUrl}}.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you @Gareth Cantrell for all your suggestions, the issue was in the baseURL but it is resolved.
Rule is working correct.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Gareth Cantrell
Is there any way to send email when rule gets failed or any error occurs.
Can we keep the check for Audit log status whether the rule is ran successfully or some error occured.
I have tried the following approach but it is not sending mail.
Any open suggestion with better option which has quick implementation is welcome.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In the rule details section, you can select to be notified if the rule fails and select the rule owner who will receive these notifications as in the below screenshot:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gareth Cantrell,
Have tried the same but it is not sending the mail.
Is there any way to access the audit log status value like "SUCCESS" or "SOME ERRORS" so that we can send the mail based on status response, I have tried to console like {{Audit log.Status}} etc various combinations but didn't print anything.
Let me know if it is possible.
Thanks for always responding!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Mohini Chandwani you could try looking at {{webhookResponse.status}} which will return the HTTP Status code for last web request action.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi everyone, I just wrote a KB article describing how to create an automation rule that will sum up all the story points of stories linked to a parent Epic ticket in Automation for Jira for Server/Data Center.
Can you take a look and let me know if it helps?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This method works well, but not for existing epics that have stories with story point values already assigned. This method only adds story points to the epic story point total when the value of story points in a single story is changed.
It would be helpful to include a way to do a one-time sum of all story points in an epic for existing epics. Once that initial sum is generated, this method works well.
Thanks,
Zac
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your feedback. That's a great point indeed. The solution I wrote will only work indeed for freshly created Epic/Stories, but not for ones which already have story points assigned.
It is unfortunately difficult to find a solution without having the lookup method which only exists in Automation for Jira on Cloud :(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The below automation rule can help here to achieve this on Jira server/datacenter version without using any authentication method.
{{fieldChange.fromString}}
{{#=}}{{issue.Story Points}} + {{fieldChange.toString}}{{/}}
{{#=}}{{issue.Story Points}} + {{fieldChange.toString}} - {{fieldChange.fromString}}{{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was trying different proposals but it does set the sum value of story points to the epic.
See my logic here
and here
so when the rule is enabled and I set or change story points in a story I'm getting no error
but when I reload the epic and check for the story points field, it remains empty
Did I misunderstood something, do you see an error in my logic or do you have a proposal on how to proceed?
Thx
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for the workaround for summing story points into the Epic story points field! I am using JIRA server so I've been looking for a solution to this issue.
My rule runs without errors but the story point field in the Epic that should be updated is not being updated. Furthermore, if the Epic has a story point value it is erased when this rule runs.
Here is a screenshot of the rule. Any ideas?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Wyner_ Zachary G_ I'd suggest adding a Log action after the Send web request action and the log the value of your custom field from the web response to make sure the values you are getting back are what you are expecting to see.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Gareth Cantrell Thanks for the fast response! I added a log action but it seems like the value being returned by the web request is the story point value for the epic, which is null.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Wyner_ Zachary G_ as you say, you're logging the field in the epic. Try logging the response from the web request instead: {{webhookResponse.body.issues.fields.customfield_10002}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Getting closer! According to the log, the web request is retrieving the values I am expecting and the rule successfully executes. However, it still nulls out any value in the Epic "story points" field rather than summing the story point values from each story.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just letting you know I got the rule to work! I had to change the formula in the edit issue fields action to this:
{{webhookResponse.body.issues.fields.customfield_10002.join("+")}}
Thanks for your help!
-Zac
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great to hear you managed to get it working, although I am surprised the sum() function didn't work for you.
May be worth raising a support request with Atlassian to investigate.
Cheers,
Gareth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Wyner_ Zachary G_,
I guess the problem is in the web request URL, it is returning null because you didn't mention customfield of Story point to retrieve the story point value from those issues.
Can you just try these once - {{baseUrl}}/rest/agile/1.0/epic/{{issue.key}}/issue?customfield_10002 it will return the story point values of all child of their Epic parent.
sum function should work, I am using the same approach it adds all the child story points and total will be added to respective epic parent.
refer the below snap.
Hope it should work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You can try out our add-on to track progress of issues in Epic hierarchy on time estimates and at story points as well.
Agile Tools - Epic Tree and Time in Status
The add-on allows you to manage and visualize your Epics with rolled up estimate progress reports along with multiple Time in Status Reports ( more than 6 reports).
Key features:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Maybe consider the Epic Sum Up addon. There is a lite (free version) - epic-sum-up-light
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jack,
thank you for recommending Epic Sum Up. The free Version sums up Time only, but the full version sums up everything you want.
Looks like this:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.