I have setup an automation rule for when 'Total Story Points' custom field changes on an Epic issue type the parent issue that is linked to that Epic as the parent should have the 'Total Story Points' reflected onto the parent ticket.
The audit log says that the issue SABELST-938 was successfully edited. However, on the actual parent issue which was linked to the Epic does not show that number. It just shows zero. Which it shouldnt. Seeing as the 'Total Story Points' reflected on the Epic is an actual number. Can someone help assist why it does not display?
Hello @Mahnoor Arshad
Can you add a log action within the For JQL branch to print the value of the smart value you are using to set your variable?
I think that not all custom fields accessible through Lookup Issues can be supported by the "sum" function. I suspect that you will find that {{lookupIssues."Total Story Points".sum}} has no value.
I have added a log action and it seems that everything executed properly. However, there is still no 'Total Story Points' number that appears from the Epic issue. Please see screenshots for reference.
Automation Audit Log:
Parent Issue:
Note: Total Story Points is shown as zero when it should have a number.
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 that additional information.
There is no value in the field because the variable you are using to set the field has no value:
As I mentioned, I think the "sum" function does not work with all custom fields.
Can you add a log action to print {{lookupIssues."Total Story Points".sum}} ? I think you will find that it also will show that the smart value has no actual value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
2 points that came to my mind:
{{lookupIssues.Total Story Points.sum}}
{{totalstorypoints.asNumber}}
Besides that I have 2 questions:
Please let us know if this was helpful or if there still occus any problems and/or questions. If so please always send screenshots of the audit log for further analyse.
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, and...to the note from @Trudy Claspill
The Lookup Issues action for Jira Data Center does not support custom fields yet, and here is the suggestion to add those: https://jira.atlassian.com/browse/JIRAAUTOSERVER-877
For your scenario, you will need to use the REST API to gather the work items and sum the field rather than using Lookup Issues. Please see my comment in that suggestion for more details.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
While we have concluded that the rule will not work as written I wanted to address your two questions on behalf of the question author.
The rule is triggered by the change of field value in an Epic, and the goal is to update the Parent of that Epic with a sum of that changed field for all Epics under the same parent.
The Lookup Issues action was being used to collect all the Epics under the same Parent.
The branch was used to shift focus to the Parent so it could be edited. The Branch/Related Issues/Parent is not used because the author is working on Jira Data Center, and that type of branch is valid only when the trigger issue is a sub-task.
Your image of the For Parent branch is from a Jira Cloud instance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I modified my existing automation rule to go off of what @Stefan Salzl suggested. By adding the 'Parent' branch and removing the JQL. In addition, I also updated the edit issues smart value to
{{totalstorypoints.asNumber}}
I executed this automation rule, however the total story points custom field on the parent issue now shows as 'none'. Not sure what the fix can be aside from going the REST API way. I would be open to other Jira automation suggestions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As we already described, that field does not exist in the Lookup Issues result.
Please see the other sources I provided for how to gather the information using the REST API endpoint for an issue search instead.
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.