I have tried a lot of different ways to sum up the total story points to an epic based on previous questions and resolutions however unfortunately I'm still missing something and can't get my totals to add up in the epic.
I have set the following rules for automation:
The automation rule says that everything has passed however the sum of the story points are not being updated in the epic:
Hoping someone can help point me in the right direction. Thanks
Hello @Mark_Gallier
Are these issues in a Team Managed project or Company Managed project? You can find that information at the bottom of the panel on the left when your viewing the board for the project.
What is the value of the "Story point estimate" field in the issue that triggered the rule?
Can you paste the text of the smart value you are using to set the Total Story Points field into this post? It is a little hard to see it clearly in the image to double check for typos. You can also use the Log action to print that value into the Audit Log to see if the sum function is returning a non-zero value.
This is a Team Managed project.
The value for the "Story point estimate" field in the trigger issue is "3":
This is the smart value from the "Total Story Points" field:
{{lookupIssues."Story point estimate".sum}}
I can't see anything about "Log action" unfortunately to give that a go.
Let me know if you need anything else. Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Mark_Gallier
Here is the documentation for the Log action:
https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Log-action
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Trudy Claspill
I've tried adding the {{#debug}} to help test my smart value rule but it doesn't appear to be working so I'm still a bit stuck - is there anything else I can do here please?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You don't need "{{#debug}}".
Use the Log action to print out the smart value to the Audit Log when the rule executes.
You can add some explicit text so that you recognize the output in the log.
The output in the log would then look something like this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the help @Trudy Claspill
The log is working however I still can't work out why it's calculating as 0 when I change the "Story point estimate" field on the ticket
What's strange is I have the automation set up on other Team Managed projects and it works correctly so I'm not sure what the difference is here. Hoping you can help. Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Looking at that latest screen image, I wonder if the smart value expression you are using is invalid. Smart values are name, spacing, and case-sensitive.
Please try using exactly this one, with no changes. I added a default value of 0 in the event the field is empty.
{{lookupIssues.Story point estimate.sum|0}}
And can you confirm that the issue shown in the log, GDS-977, actually has a value in the field?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Another thing to check is that the Lookup Issues action is actually returning results.
You can add a Log action after the Lookup Issues action to print out how many issues it found using the smart value {{lookupIssues.size}}
As Bill said, smart values need to be exactly right. In your Log action for the Lookup Issues sum, it looks like you might have a blank space in the smart value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bill Sheboy @Trudy Claspill
Thanks for your further support and recommendations. I've carried out both of your suggestions and unfortunately it's still not working. It picks up the issue in the logs but it's still not picking up the story point estimate from the relevant field. The field itself is a Jira default field - the only customer created field I have made is the Total Story Points field under the epic issue type.
it should show 3 story points based on the change above from ticket 977 but it's just pulling through as a 0. Any other suggestions at all please?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Would you please show an image of your current, complete rule, in one image? That may provide some context. (When the rule is longer, a screen capture or browser addon for scrolling capture can help to do that.) Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Add another Log action after the Lookup to print out this:
{{lookupIssues.first.key}}, {{lookupIssues.first.Story point estimate}}
That should print out the issue key and Story point estimate field value from the first issue returned in the Lookup Issues results.
If that also prints 0 for an issue where you can see the field contains a value, then Jira may be confused about which field you mean by Story point estimate.
I advise you to add text to the Log action so that when you look in the Audit Log you know what each Log output is actually for, like the example I provided for the Log action in my previous comment.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Trudy Claspill @Bill Sheboy
I've made further changes as you've suggested and it does look like there's something wrong with the 'Story point estimate' field as the rule just doesn't appear to be picking any data up in that. Here's a screenshot of the rule in it's entirety:
As mentioned previously the 'Story point estimate' is the Jira default field so I'm not sure why this isn't working. Any other help would be really grateful so I can get to the bottom of this issue please. Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I can only think of two more things to try...
First, rules can get "glitched" by too many edit / publish cycles. I have no idea why this happens, and it appears related to the underlying JSON getting broken. The diagnostics for this are:
If that does not help, you appear to be the site admin for a paid, Jira license...and so I recommend submitting a ticket to Atlassian Support here: https://support.atlassian.com/contact/#/
They may see things in the rule and internal logging that we are missing. When you hear back from them, please post what you learn to benefit the community. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Another option to try is to reference the field by its unique ID rather than its name; i.e. customfield_#####.
You can find that ID for a field in a specific issue following the guidance here:
https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/
Review the output to find the "Story point estimate" field reference that contains the value you see on the screen for the issue.
It is possible that there is more than one field named "Story point estimate" in your system at this point, between the built-in custom field and the potential for multiple custom fields to have the same name.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Trudy Claspill @Bill Sheboy
We have success - thank you so much for your help. I've managed to get the rule to work using the customfield_ID. I'll remember this from now on in case I have a similar issue.
Thank you for your patience and support to help me get to the bottom of this.
Thanks
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, Mark.
Just to confirm what happened: using the smart value "Story point estimate" from lookup issues did not work, but the custom field id for it did work?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bill Sheboy yes that's correct - I assume like @Trudy Claspill mentioned it's down to the fact we have more than one instance of 'Story point estimate'. Using the custom field ID has worked using all of your other improvements you provided me with. Thanks again for your help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Mark_Gallier Welcome to the community.
I've asked a similar question to sum up the story points for a story using Automation. Later I've also added the answer to the same question after the issue was resolved.
This might be useful to you.
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.