Automation based on time tracking
Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.
Summary
Create automation for time tracking which will send emails based on the threshold set in the condition.
Solution
Prerequisite for the rule :
Two fields to set the notification budget threshold value as per your requirement.
Rule logic :
We will trigger the rule when the work log is entered in an issue.
we will subtract the original estimate and remaining estimate and divide it by 28800 (/60/60/8) where 8 denotes the 8-hour work per day. This will give you the actual time spent on the case by the user.
Now, we will calculate the threshold values: Here: 50% is /2 and 75% is calculated by /4*3
for 50% we will divide the original estimate value by 28800 and we will divide the result by 2
for 75% we will divide the original estimate value by 28800 and we will divide the result /4 with the result, we will multiply by 3.
We will now add conditions to the calculations made in the above 2 steps.
if step2 value > step3 50% and step2 < step3 75% then we will update the field the notificaiton_50%_budget to YES and then send an email to the users.
if step2 value > step3 75% we will update the field notification_75%_budget to YES and send an email to users.
Rule creation steps :
Step 1:
Step 2:
Action → Create variable
smart value :
{{#=}}({{issue.fields.timetracking.originalEstimateSeconds}} - {{issue.fields.timetracking.remainingEstimateSeconds}}) / 28800 {{/}}
Step3:
Action → create variable :
Smart value :
{{#=}}({{issue.fields.timetracking.originalEstimateSeconds}} / 28800) / 2 {{/}}
Step 4:
Action → Create variable
Smart value :
{{#=}}({{issue.fields.timetracking.originalEstimateSeconds}} / 28800) / 4 {{/}}
Step 5:
Action → create variable
Smart value :
{{#=}} {{seventy}}* 3 {{/}}
Step 6:
Condition if :
Step 7:
Action → Edit issue :
Step 8:
Condition - Else
Step 9:
Condition - Else
Complete rule looks like the below
Was this helpful?