EDITED to update the problem:
I am using some automation rules documented on this site to update my Epic value for {{worklog.timeSpent}}.
It DID NOT work as shown in several submissions in my Cloud environment.
The accepted answer is actually to get the rules to work to update the Epic Values.
I will open a new question about calculating my "% Complete" custom field, if I have additional questions related to that.
BELOW IS NO LONGER RELEVANT TO THIS QUESTION.
Since that worked, I am now trying to update another field (custom field that I created) called "% Complete". I realize that there is a % done field, but it uses tasks completed instead of time.
Anyway, I am not getting the syntax correct on the math. Can someone help me with the syntax?
{{#=}} ( {{worklog.timeSpent}} * 100 ) /
( {{timetracking.originalestimate}} - {{worklog.timeSpent}} ) {{/}}
After getting my Epic work log to work, I focused on getting my custom field "% Complete" to update.
This is only triggered now on a comment update as I was troubleshooting the syntax. I will put the correct trigger in place (or maybe cron) to initiate.
The Add value to the audit log has the calculation.
The Add to
I got the Epic work log script to work by using 2 scripts.
They are pretty much identical, with one being initiated by a sub-task to update the work log on the parent story.
The other being initiated by the story to update the work log on the parent Epic.
The story initiated rule has "Check to allow other rule actions to trigger this rule. Only enable this if you need this rule to execute in response to another rule." box checked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Kalyan Sattaluri @Bill Sheboy
Sorry for the delay, but I found out that my automation wasn't working for summing up the total logged work into the Epic. I am using the flows from several articles in the community, but it doesn't work when work is added to a sub-task which adds to the story, but not the Epic.
If I manually add time to the Story, the epic is updated. My calculations above are not even being considered by automation.
I am now back to troubleshooting the automation to update the Epic with time logged on a sub-task of a story.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Bobby Williams
Usually, this is a symptom of you not referencing correct field.
What I mean is, in your Jira set up, you have 2 or more fields of the same name "worklog".
You need to find the customfield value and use that name to update, instead of {{worklog.timespent}}.
So to trouble shoot and find the correct customfield value:
Hope it helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As written, I would not expect that rule to update a Story when work is logged for a Subtask. The reason is the branch is to Epic (parent), and Subtasks do not have an Epic for a parent.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
^^. Thanks Bill.
@Bobby Williams - Please clearly state what are you trying to do and what is working.
I thought your sub-tasks -> story update was working and story->Epic is not.
But now that I reread your post, I am confused if thats even the case.
So please clearly state what is working and what next are you are trying to do before going to deep.
Also, This topic has been covered pretty well in the forums. If you are referencing a particular post, share that link as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As shown in the rule diagram above, if I manually add work log time to a story, the Epic work log gets updated.
However, if I add time to a sub-task, the story gets updated (include child issues is checked), but the Epic doesn't get updated.
It would seem that if the Story worklog get updated, either manually or cumulatively, then the Epic would update its worklog.
Manually adding time to the Story will update the Epic worklog.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bobby Williams -- Welcome to the Atlassian Community!
For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected. Those will provide context for the community to offer ideas. Thanks!
Until we see those...
Some of those smart values you are using are the output-formatted ones for time tracking and not numbers. For example, I believe the one to use for original estimate in a math expression is this:
{{issue.timetracking.originalEstimateSeconds}}
Please confirm the smart values you are using are numbers.
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.
I apologize for the lack of documents and screenshots.
I am a newbie in this forum, but should know better :(
I will do better.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Bobby Williams
Your syntax as you have listed is fine but why isnt it resolving to a value?
We dont know.
You havent shared your rule screenshot or audit log.
Please log all these smart values outside/before the calculation step, run the rule and share the rule/audit log so community can help.
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.