Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation Rule: Sub-task Logged Time Should Reduce Remaining Estimate of Parent Task (with Label Co

Andreas Schaefer
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 31, 2025

Hi Community,

I'm trying to set up an automation rule in Jira and would appreciate your guidance or suggestions.

Goal:
I want to create an automation rule that performs the following:

  • When a sub-task is created under a main task, and time is logged in the sub-task,
  • The logged time should be subtracted from the "Remaining Estimate" of the main task.
  • This rule should only trigger if the sub-task has the label "backup".

Use Case:
We use sub-tasks labeled "backup" to track support or fallback work. To keep our main task estimates accurate, we want the time logged in these sub-tasks to automatically reduce the remaining estimate of the parent issue.

What I’ve Tried:
I’ve explored the automation builder but haven’t found a straightforward way to reference the parent issue’s remaining estimate and update it based on the sub-task’s logged time.

2025-07-31_12h10_27.png

1 answer

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 31, 2025

Hi @Andreas Schaefer -- Welcome to the Atlassian Community!

Your rule's JSON expression to update the value appears to be using a created variable which was never created.

Please try adding that inside the branch and before the edit to calculate the value by subtracting the new worklog value.  For example:

  • action: create variable
    • name: newRemainingMinutes
    • smart value: 
{{#=}} ROUND( ( {{issue.timetracking.remainingEstimateSeconds}} - {{worklog.timeSpentSeconds}} ) / 60, 0) {{/}}

How that works:

  • subtract the new worklog from the parent's remaining value in seconds
  • divide those to get minutes
  • round to drop any remainder
  • wrapping it all in a math expression

 

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer