Trigger Jira automation based on cumulative time logged on a work item
Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.
Summary
Jira Automation can calculate the total or cumulative time logged on a work item, and trigger additional actions when that time exceeds a certain amount. For example, if you'd like to receive an email notification whenever work items have more than 4 hours logged on them, Automation can help!
Solution
Automation smart value to sum time logged on work
The Smart Value that enables our automation rule is {{triggerIssue.worklog.timeSpentSeconds.sum}}.
By using this smart value as a condition in an automation rule, we can fire actions only when this total value exceeds a certain amount.
Let's create an example rule that runs whenever time is logged on work, and will send an email if that value exceeds 4 hours. If you prefer, you can select a different trigger, including Scheduled triggers.
Navigate to your project and select Project settings > Automation > Create rule
Select the Work logged trigger
Select IF: Add a condition and choose the {{smart values}} condition
Set the First value to:
{{triggerIssue.worklog.timeSpentSeconds.sum}}
Set the condition to greater than
Set the Second value to 14400
14400 seconds = 4 hours
Add an Action
Choose the Send email action and configure the email to your liking
For a reference on other Smart Values you can use in the Automation rule, please refer to our documentation: Automation smart values - work items
Was this helpful?