How to ignore updates in the issues that were made during the weekend while closing them via Automation for Jira

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Jira administrators may need to close the issues via Automation for Jira if they are not updated for a specific period of time. One of the scenarios is excluding the weekend days. A single JQL query is needed to find such issues. For now, Jira application does not have this functionality to query based on the day of the week. Hence, it's not possible to ignore the updates that are made during the weekend. There is a Feature request to do this:

Resolution

In this case, we need two automation rules instead of one.

  • Automation Rule 1
    You need to create a rule that runs only on Monday. This rule checks the issues which are not updated since Friday by adding updated <= -3d

updated <= -3d AND project = "ABC" AND ...
  • Automation Rule 2
    This one should run from Tuesday to Friday:
updated <= -1d AND project = "ABC" AND ...

When you are configuring their automation rules, you need to click on the Use cron expression while scheduling the frequency and use the expressions based on your need. For instance:

  • This cron expression is going to trigger the rule on Monday, every 10 minutes:
0 0/10 0 ? * MON *
  • And this one From Tuesday to Friday, every 10 minutes:
0 0/10 0 ? * TUE-FRI *
Last modified on Nov 21, 2024

Was this helpful?

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