How to simulate a delay/sleep function in the automation


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

Purpose

While working with automation, we come across many situations where we need to delay the subsequent actions by a certain amount of time. Often we want to ensure that the current action is finished before the subsequent actions are executed. For instance, in case of branch execution, which executes in parallel to the main thread of execution, sometimes it is essential for the branch to finish before the main branch resumes execution. Since the automation does not offer a sleep or delay function, we need a way to simulate this at this time

This functionality has been added to Jira Automation via the Delay Action: AUTO-238 - Support for delay / pause / wait step in automation rule executions.

This article has been left as-is for insight & learning for other potential Automation solutions.
While its contents are useful, its goal has been fulfilled via a feature for this purpose.

Solution

  • To simulate delay, we can simply send an outgoing webhook to pull out any system field data and do some dummy processing like simply updating a dummy field with one of the fields in the response or even simply printing the response data to the audit log. Processing time can be reduced by introducing an IF condition to process the dummy data that passes the condition, for example, the status names that start with a particular letter or belong to a particular status category.



Important

During the testing, with 70 statuses and no other automation running, this automation took 55 seconds to complete. You might get a different reading based on your system load and the number of statuses in your site


Last modified on Jan 31, 2025

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.