自動化ルールの最適化に関するベスト プラクティス
次のベスト プラクティス ガイドラインによって自動化ルールを最適化することで、より円滑に実行できて管理しやすくなります。
管理性
ルールを作成する前に計画を立てる
Planning your automation rules ahead of time will help you work out what rules you must have, and where you can instead combine rules by using conditions.
Start with your team’s work processes and the actions you want to occur, then work backwards to what events you want to trigger those actions. For example do you want to send emails in response to customer feedback comments on all work items, or just for high priority work items?
ビジネスと業務プロセスに合わせた自動化計画
Automation rules are designed to help your business and operational process work more efficiently; they should align. A review of your automation rules should occur alongside reviews of your business and operational processes.
使用制限内にとどめる
ルールに条件を追加する
Use conditions to ensure that actions occur exactly when you want them to. Only rules that perform a successful action will count toward your usage, so this will help you make the most of your monthly limit. For example, in Jira automation, consider adding a filter for work item status, to only run for particular statuses (like To Do
, or In Progress
),
ルールのスコープを確認する
Make sure your rules run only in the Jira or Confluence spaces you want them to run in. That is, if you have rules with Global scope but they don’t need to run across every Jira or Confluence space, change their scope to multi-space.
This will minimize wasteful rule runs, and help you get the most out of your monthly usage.
ルールを無効にする
ルールを監視し、実行量が多すぎるルールや不要なルールを特定し、それらを無効にして、無駄なルール実行を防ぎます。
パフォーマンス
ルールのスコープを制限する
Avoid using global scope as much as possible. Consider whether rules must apply to multiple spaces or if a single-space scope would suffice. This change improves the efficiency of your rules: any events from spaces without a matching rule are filtered out. As a result, there are fewer rules that need to be queued for execution.
Combine rules
ルールは単独でも十分機能しますが、組み合わせて使うこともできます。複数の現在のルールに対して同じルールを使えるのでしょうか。たとえば、現在のルールで分岐するルールがあり、その下で条件とアクションを実行するとします。
適切なトリガーを選択する
Some triggers are more specific than others, so if your situation requires a specific trigger, avoid using a more general one. For example, in Jira automation, Field Value Changed is far more economical than Work Item Updated. This is because updating a work item can encompass many things, while changing a field value is a more specific kind of update.
ルール チェーンで可能な限り早く比較条件を使う
You want to use conditions that compare one value with another early in your rule, to eliminate possible work items or pages as early. Examples of compare conditions include the User condition, Advanced compare condition, or Work item fields condition (Jira only).
たとえば、ルールの早い段階で条件によって work item type = Bug
バグかどうかを確認した場合はルールからバグ以外のすべてを早期に排除できるため、ルールがはるかに効率的になります。
Ideally, you should be chaining these conditions at the start of your rule to exclude all the work items you don’t want to operate on as early as possible.
処理量の多いチェックをルール チェーンの下位に移動する
Conditions that check singular fields, such as the Work item fields condition (Jira only) or User condition, are the simplest to run so these should be earlier in your rule chain.
詳細比較条件と JQL や CQL などのクエリ言語を含む条件には、より多くの処理が必要です。できるだけ使用を避けるか、チェーンの後半で使用するようにしてください。
たとえば、type = Done
(JQL 条件) を確認するには、{{issue.status.name}}
= Done (詳細比較条件) の場合よりも多くの処理が必要となります。
ブランチの使用は控えめにする
ブランチは、絶対に必要な際にのみルールに追加してください。これは、ブランチによってルールに新しいプロセスが生成されるためです。ルールを組み合わせる場合は便利ですが、目的を果たさない場合はパフォーマンスに悪影響を及ぼしかねません。
この内容はお役に立ちましたか?