How to get total time logged into an issue using Automation for Jira

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

Summary

This article details steps to get the total time that is logged into a Jira issue via Automation for Jira. This action can be of benefit for Jira admins who would like to track the total time that is logged an issue's worklog, E.g: To send a notification when the total time logged into an issue exceeds a certain amount.

Solution

Create an automation as below:

  • Pick 'Work Logged' trigger (Or any trigger depending on when/where you would like this rule to be triggered)

  • Then, add an {{smart values}} condition. The total amount of time logged into the issue that triggers this rule can be achieved using the following smart value: {{triggerIssue.worklog.timeSpentSeconds.sum}}

    For more options that can be used for the work log smart value, please refer here : Worklog Smart Values

  • Put the above smart value into the 'First value' and then the desired condition. Do note that the retrieved value from the smart value is in seconds, so do make sure the value to compare the time to is set in seconds. (E.g: To compare if the time logged into the issue has exceeded 4 hours, the 'second value' has to be set as 14400 (14400 seconds is 4 hours))

    Screenshot of rule configuration

  • Add an action that occurs if the condition is successful. E.g: Add a comment to the issue, send an email notification

  • Save and publish the automation rule.

Updated on February 23, 2025

Still need help?

The Atlassian Community is here for you.