ルールをデバッグする

Jira のプロセスとワークフローを自動化する

このページの内容

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

robotsnoindex

If a rule isn’t behaving as expected, the following information can help you troubleshoot and resolve issues.

1. 監査ログを確認する

Checking the audit log should be your first step when a rule is failing. When reviewing the audit log:

  • Check for any displayed errors. If there are errors, do they offer any suggestions or instructions on how to fix the problem?

  • Are all the relevant fields on the right screens in Jira?

  • 監査ログの編集と、課題ページの課題履歴タブを比較します。

  • If there are no entries and you were expecting some, you either haven’t configured the trigger correctly, or the trigger has a filter on it which isn’t behaving as you expect.


2. スマート値のデバッグ

Use the Log action

The Log action adds values into the audit log, including smart values. This can be useful when testing complex smart-value functions.

Log message:

This should evaluate to 2: {{#=}}1 + 1{{/}}



Use debug

Using the Log action requires you to add an additional component to your rule. To avoid this, you can use the {{#debug}} function, e.g. {{#debug}}{{issue.fields.description}}{{/}}.

Surrounding any smart value with debug, allows the smart value to be processed as normal and also prints the value in the audit log to provide more contextual information.

{{#debug}}{{#=}}1 + 1{{/}}{{/}}

When this rule now executes, the audit log will contain:

Debug message
  2


3. テストを簡単かつクリーンにする

  • Copy the rule and disable the original before testing. This allows you to revert to the original rule easily if you make changes.

  • Use the Manual trigger to execute a rule from an issue at any time.

  • Use the Scheduled trigger and click Run rule to trigger the rule for testing.

  • Use the smart value {{now}} to include the current time in your issue fields. This allows you to see when the edit was made and if the value changed.

最終更新日 2020 年 7 月 13 日

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

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