Jira 自動化の一般的なトラブルシューティング ガイド

プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。

このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。

*Fisheye および 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.

このページの内容

環境要件

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.

このガイドは、以下を使用していることを前提としています。

  • Jira Data Center 8.0.0 以降
  • Jira 自動化の Data Center 7.4.0 以降

複雑なユース ケースに基づいて自動化ルールを設定する

(question) ユース ケースが複雑で、それを自動化ルールに変える最善の方法がわからない場合、どうすればよいでしょうか?

(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. 

自動化ルール テンプレート

自動化ルール実行の問題を調査中

(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:

  • ルールの [監査ログ] ページに移動する:
  • ルールが実行されるはずだった時間のエントリを探します。
    • ルールがトリガーされると想定していた時間にエントリが見つからない場合は、「症状 1」セクションに進みます
    • ルールがトリガーされると想定していた時間に 1 個を超えるエントリが見つかった場合 (ルールが複数回トリガーされた場合) は、「症状 2」セクションに進みます
    • 監査ログに 1 個のエントリが見つかった場合は、ルールの実行ステータスを確認して、そのステータスに関するセクション (「症状 3」から「症状 7」セクション) に進みます

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

この記事で問題を解決できない場合は、アトラシアン サポートに連絡して、「アトラシアン サポートにデータを提供する」で説明されているとおりに必要なデータを提供することをお勧めします。

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:

症状 3 - SOME ERRORS ステータスでルールが完了しない

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:

ルール監査ログで報告される最も一般的なエラーのトラブルシューティング

症状 4 - FAILURE ステータスでルールが完了しない

ルールがトリガーされたが、FAILURE ステータスで失敗した場合は、監査ログに表示されたエラー (あれば) を確認し、以下のリンク先のナレッジ ベース記事でそのエラーを探してください。

ルール監査ログで報告される最も一般的なエラーのトラブルシューティング

症状 5 - IN PROGRESS ステータスでルールが完了しない

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.

このような状況の調査方法を確認するには、以下のセクションを展開してください。

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

ルールが実行していたアクション/操作の種類に応じて、以下のナレッジ ベース記事を確認することをお勧めします。

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)

このような症状の調査方法を確認するには、以下のセクションを展開してください。

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

この種の問題は調査が難しい場合があります。最初のステップとして、以下のリンクを確認することをお勧めします。最も多くのリソースを消費し、他のルールの想定どおりのトリガーを妨げている可能性のある自動化ルールを確認する方法を紹介しています。

Jira 自動化のパフォーマンス インサイト ページで、(他のルールと比較して) 非常に多くの回数実行されているルール、合計実行時間が非常に長いルール、または頻繁に調整されているルールが表示される場合は、これらのルールを調べて次のことを行うことをお勧めします。

  • 次の方法で最適化してください。
    • スコープがグローバルではなく、特定のプロジェクトに限定されていることを確認する
    • ルール内に JQL クエリを使用した IF 条件がいくつかあることを確認し、少数の課題に対してのみ実行されるようにする
  • または、可能であれば一時的に無効にします

One common scenario where automation rules are triggered with a delay and the automation queue is piling up is described in the KB article below:

確認しておくべきもう 1 つのポイントは、自動化ルールで処理する必要があるすべてのイベント/アイテムを収集する Jira 自動化キューの状態です。

  • クエリ 1

    • 以下の SQL クエリは、Jira 自動化キューのサイズを示します。このクエリを一定の間隔 (たとえば 10 分おき) で実行すると、キューが (数万項目まで) 絶えず増え続けているのか、それともサイズが制御されているのかがわかります。

      select count(*) from "AO_589059_AUTOMATION_QUEUE";
  • クエリ 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;
  • クエリ 3
    • 以下の SQL クエリは、キュー項目をイベント タイプ別にグループ化します。これにより、どのタイプの Jira 課題アクティビティがキューに影響を与えているかがわかります。

      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...?

これらの準備手順で問題を解決できない場合は、アトラシアン サポートに連絡して、「アトラシアン サポートにデータを提供する」で説明されているとおりに必要なデータを提供することをお勧めします。

スマート値に関連する課題を調査する

自動化ルールは、Jira 課題フィールドを動的に取得できるスマート値とともに使用できます。スマート値は、さまざまな理由 (構文の問題、設定の問題、トリガーの問題など) により空の値を返す場合があります。次に示すリンク先の KB 記事には、スマート値が空になる一般的な理由がすべてリストされています。

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.

これらの問題のいずれかに直面した場合、こうした症状とその修正方法について記載されている以下の 2 つの記事を確認することをお勧めします。

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

発生している問題が上記のシナリオや記事で取り上げられていない場合は、以下のセクションを展開して、記載されている問題を確認してください。

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.

有益なトラブルシューティング データ

データベース テーブルと SQL クエリ

Jira 自動化 (Automation For Jira) DB テーブルは、名前が AO_589059_ で始まるテーブルに保存されます。

  • Tables starting with AO_589059_RULE_ are mostly related to rule configuration
  • AO_589059_AUDIT_ で始まるテーブルはルール監査ログに関連している
  • AO_589059_RULE_STAT_ で始まるテーブルはルール実行統計に関連しています。
  • AO_589059_AUTOMATION_QUEUE テーブルには、自動化キューに追加されたアイテム/イベントが含まれている

これらのテーブルにクエリを実行する方法の例を解説した KB 記事のリストを以下に示します。

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) スレッドの数は自動化サービスの制限に従って変更できるため、以下のリストとは異なる場合があることにご注意ください。

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

  • イベント シリアライザー スレッド (automation-event-serializer:thread-X)
    • Jira 課題イベントをリッスンし、シリアル化して、AO_589059_AUTOMATION_QUEUE テーブル内の Jira 自動化キューに保存します。
  • キュー要求者スレッド (automation-queue-claimer:thread-1)

    • It reads the events queued in the database

    • 次に、イベントを実行スレッドに渡します。

  • イベント実行スレッド (automation-rule-executor:thread-X)

    • キュー クレーム スレッドからイベントを受信します。

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

    • 監査ログにエントリを追加します

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 DEBUG level (via the page ⚙ > System > Logging and Profiling) might help:

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

(warning) このような DEBUG パッケージは冗長であるため、短期間のみ有効にすることをお勧めします。あるいは、次に示す冗長性の低いパッケージを有効にすることを検討してください。

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


アトラシアン サポートにデータを提供する

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:

アトラシアン サポートにデータを提供する
  • ほとんどの種類のルールの問題 (ルールがエラーで失敗する、トリガーされなかった、期待される結果が得られなかったなど)。
    • 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
    • これらのルールをトリガーしたか、トリガーするはずだった Jira 課題の例 を示すスクリーンショット
  • 自動化ルールがトリガーされなかったり、トリガーが遅延したりすることに課題が関連している場合:
    • Generate a support zip from the Jira application, by following the steps below:
      • Go to ⚙ > System > Logging and Profiling
        • [別のパッケージのログ レベルを設定する] をクリックします。 
        • パッケージ名として com.codebarrel.automation を使い、「ログ レベル」として「DEBUG」を選択する
        • [別のパッケージのログ レベルを設定する] をクリックします。 
        • パッケージ名として com.codebarrel.jira.plugin.automation を使い、「ログ レベル」として「DEBUG」を選択する
      • 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
      • ⚙ > [システム] > [トラブルシューティングとサポート ツール] > [サポート zip を作成] に移動し、サポート zip を生成します
    • Jira アプリケーションからスレッド ダンプを生成します




最終更新日: 2025 年 2 月 18 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.