General troubleshooting guide for Jira automation

robotsnoindex

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

 

Configuring and troubleshooting automation rules using Jira automation (formerly known as Automation for Jira) can be a challenge. The purpose of this page is to list all the useful resource and links that will help you depending on the type of challenge you are facing.

On this page:

Environment requirements

Starting from Jira Data Center 10.0, we integrated Jira automation (formerly Automation for Jira) as part of Jira Data Center (both Software and Service Management), offering you the convenience of upgrading either through Jira or the Universal Plugin Manager (UPM). To streamline and enhance your experience with Jira automation, we've made the decision to solely offer it as a bundled version starting from Jira 10.0.

This guide assumes that you're using:

  • Jira Data Center 8.0.0 or later
  • Jira automation Data Center 7.4.0 or later

Configuring an automation rule based on a complex use case

(question) You have a complex use case, and you are not sure what is the best way to turn it into an automation rule?

(lightbulb) In this case, we advise that you open the article below, since it includes more than 50 rule templates, and it is actively updated with new examples. It is a great starting point, as you might find a template that is close to what you are trying to achieve. 

Automation Rule Templates

Investigating automation rule execution issues

(question) You already configured your automation rule but it is not working, meaning that it did not run, failed to run, or did not lead to the expected result? You already went through the basic steps listed in Troubleshoot Automation Rules, but they did not help?

(lightbulb)In this case, we need to first identify the type of problem, and then move on to the relevant section of this page based on the problem:

  • Go to the Audit Logs page of the rule:
  • Look for an entry at the time when the rule was supposed to be executed:
    • If you do not find any entry at the time when you expected the rule to be triggered, move on to the Symptom 1 section
    • If you find more than 1 entry at the time when you expected the rule to be triggered (the rule was triggered duplicated times), move on to the Symptom 2 section
    • If you are able to find 1 entry in the audit logs, check the status of the rule execution and move on to the section that addresses this status (from the Symptom 3 to the Symptom 7 section)

Symptom 1 - The rule was not triggered

For this type of issue, please check the KB article linked below, which lists all the known root causes so far:

Troubleshooting guide for situations where automation rules are not triggered

If this article does not help, we recommend reaching out to Atlassian Support and provide us with the necessary data as explained in Providing Data to Atlassian Support.

Symptom 2 - The rule was triggered twice instead of just once

You can find below the scenarios which are known to cause a duplicate execution of a rule:

Symptom 3 - The rule failed to complete with the SOME ERRORS status

If the rule was triggered but failed with the SOME ERRORS status, check the error found in the audit logs and look for it the KB article linked below:

Troubleshooting the most common errors reported in the rule audit logs

Symptom 4 - The rule failed to complete with the FAILURE status

If the rule was triggered but failed with the FAILURE status, check the error found in the audit logs (if any) and look for it the KB article linked below:

Troubleshooting the most common errors reported in the rule audit logs

Symptom 5 - The rule failed to complete with the IN PROGRESS status

There can be various reasons why a rule is showing as stuck IN PROGRESS. The 2 most common root causes are documented in the links below:

Symptom 6 - The rule completed with the SUCCESS status but did not provide the expected outcome 

Even if the automation rule shows the SUCCESS status in the audit logs, it does not necessarily mean that the automation rule provided the outcome that you were expecting.

Expand the section below to check how to investigate this type of situation:

How to troubleshoot "success" rules that did not provide the expected results

We recommend checking the KB articles listed below depending on the type of action/operation that the rule was executing:

If these articles don't help, we recommend reaching out to Atlassian Support and provide us with the necessary data as explained in Providing Data to Atlassian Support.

Symptom 7 - The rule completed with the SUCCESS status, but was triggered with a long delay (and the automation queue is piling up)

Expand the section below to check how to investigate this type of symptom:

How to troubleshoot delayed rules, queue size issue, etc...

This type of issue can be complex to investigate. As a first step, we recommend checking the links below which provide ways to check which automation rules are the most resource intensive and might prevent other rules from being triggered on time:

If you see rules in the Jira automation Performance Insights page that is being executed a very high number of times (compared to other rules), has a very high total execution time, or is being often throttled, then it might be a good idea to look into these rules and:

  • Optimize them by:
    • Making sure that their scope is not global, but limited to specific projects
    • Making sure that there is some IF conditions using JQL queries inside the rule, so that it is only running for a small set of issues
  • Or temporarily disable them if possible

Another point that is worth checking is the state of the Jira automation queue, which collects all the events/items that need to be processed by automation rules:

  • Query 1

    • The SQL query below will show the size of the Jira automation queue. Running this query at constant intervals (for example, every 10min) will give you an idea if the queue is constantly growing (to tens of thousands of items) or if its size is under control:

      select count(*) from "AO_589059_AUTOMATION_QUEUE";
  • Query 2
    • The SQL query below will group the queue items by automation rule IDs. If you see that 1 specific Rule ID contains a lot of items in the queue, then it is worth focusing on this rule. It is possible that this rule is configured to be triggered too often, or for too many issues:

      select "RULE_ID",count (*) from "AO_589059_AUTOMATION_QUEUE" GROUP BY "RULE_ID" ORDER BY count(*) desc;
  • Query 3
    • The SQL query below will group the queue items by event types, and should give us an idea of what type of Jira issue activity is contributing to the queue:

      SELECT 
          (aaq."PAYLOAD"::json -> 'event' ->> 'type') AS eventType,
          COUNT(*) AS event_type_count
      FROM 
          "AO_589059_AUTOMATION_QUEUE" aaq 
      where
          "PAYLOAD" is not null 
      GROUP BY 
          eventType
      order BY 
          event_type_count DESC;

Lastly, generating Thread Dumps from the Jira application is also a good way to investigate such issue, so that we can see what the Jira automation threads are doing. For example: are they all stuck running the same class, are they blocked or waiting for some resource to be available, etc...?

If these preliminary steps don't help, we recommend reaching out to Atlassian Support and provide us with the necessary data as explained in Providing Data to Atlassian Support.

Investigating issues related to Jira automation upgrade

When upgrading Jira automation from 8.x to 9.x, or when upgrading to Jira to 9.11.x (which is bundled with Jira automation 9.x), you might run into various issues, such as the inability to edit or publish automation rules.

If you face any of these problems, we recommend checking the 2 articles below which address these symptoms and how to fix them:

If these articles don't help, we recommend reaching out to Atlassian Support and provide us with the necessary data as explained in Providing Data to Atlassian Support.

Miscellaneous issues

If the issue you are facing is not covered by any of the scenario and article listed above, you might want to take expand the section below and look at the issues listed there:

Miscellaneous issues

If these articles don't help, we recommend reaching out to Atlassian Support and provide us with the necessary data as explained in Providing Data to Atlassian Support.

Useful troubleshooting data

Database tables and SQL queries

The Jira automation (Automation For Jira) DB tables are stored in table which name starts with AO_589059_.

  • Tables starting with AO_589059_RULE_ are mostly related to rule configuration
  • Tables starting with AO_589059_AUDIT_ are related to the rule audit logs
  • Tables starting with AO_589059_RULE_STAT_ are related to rule execution statistics
  • The table AO_589059_AUTOMATION_QUEUE contains the items/events added to the automation queue

You can find below the list of KB article which provides examples on how to query these tables:

Automation Threads

Below is the list of all the automation threads which come by default with Jira automation (Automation For Jira):

automation-event-serializer:thread-1
automation-event-serializer:thread-2
automation-queue-claimer:thread-1
automation-rule-executor:thread-1
automation-rule-executor:thread-2
automation-rule-executor:thread-3
automation-rule-executor:thread-4
automation-rule-executor:thread-5
automation-rule-executor:thread-6
automation-TaskTimer:thread-1

(info) Please note that the number of threads might differ from the list below, since this number can be modified as per Automation Service Limits.

The purpose of each main category of Jira automation threads is described below:

  • Event Serializer threads (automation-event-serializer:thread-X)
    • They listen to Jira issue events, serialize them and store them in the Jira automation queue in the table AO_589059_AUTOMATION_QUEUE
  • Queue Claimer thread (automation-queue-claimer:thread-1)

    • It reads the events queued in the database

    • Then it passes the events to the executor threads

  • Event executor threads (automation-rule-executor:thread-X)

    • They receive the event from the queue claimer thread

    • They execute the Automation rule(s) that should be triggered from that event

    • They add an entry in the audit log

Debug packages

In case you are trying to troubleshoot situations where automation rules are either not triggered or triggered with a delay, enabling the packages below with the DEBUB level (via the page ⚙ > System > Logging and Profiling) might help:

com.codebarrel.automation
com.codebarrel.jira.plugin.automation

(warning) Note that, due to the verbosity of such DEBUG packages, it is recommended to only enable them for a short period of time. Alternatively, you might consider enabling the less verbose packages listed below:

com.codebarrel.automation.api.service
com.codebarrel.automation.rulecomponent.jira
com.codebarrel.jira.plugin.automation.event 
com.codebarrel.jira.plugin.automation.queue


Providing data to Atlassian Support

If none of the article listed below helped investigate the issue you are facing, we recommend reaching out to Atlassian Support and provide the information below:

Providing data to Atlassian Support
  • Most types of rule issues (the rule fails with an error, or was not triggered, or did not provide the expected outcome...):
    • Screenshots showing the configuration of the problematic rules (please include the full configuration of these rules, including their trigger/conditions/actions...)
    • Screenshots showing the audit logs from these rules
    • Screenshots showing an example of Jira issue that triggered these rules or was supposed to trigger them
  • In case the issue is related to automation rules not being triggered, or triggered with a delay:
    • Generate a support zip from the Jira application, by following the steps below:
      • Go to ⚙ > System > Logging and Profiling
        • Click Configure logging level for another package 
        • Use com.codebarrel.automation as the package name, and select "DEBUG" for the "Logging Level"
        • Click Configure logging level for another package 
        • Use com.codebarrel.jira.plugin.automation as the package name, and select "DEBUG" for the "Logging Level"
      • Replicate the issue
      • Go back to ⚙ > System > Logging and Profiling
        • Search for the package com.codebarrel.automation and click on the OFF link next to it
        • Search for the package com.codebarrel.automation and click on the OFF link next to it
      • Go to ⚙ > System > Troubleshooting and support tools > Create Support zip and generate a support zip
    • Generate Thread Dumps from the Jira application




Last modified on Feb 18, 2025

Was this helpful?

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