関連する課題にアクションを実行するために自動化ルールのブランチを作成する

独立した課題は稀です。多くの場合サブタスクが含まれていたり、大きなエピックのストーリーであったり、特定の関係性を使用して他の課題に単にリンクされていたりします。つまり、自動化を使用する際は、ルールをトリガーしたソースの課題だけではなく、ソースの課題に関連するすべての課題に対してアクションを適用する必要があることよくあります。

課題の複雑な関係に対応できる強力なルールを作成するための、特別な条件やアクションがあります。たとえば、親課題のサブタスクがすべて解決されたことを確認するなどです。

  • Branch rule applies actions to related issues, for example, transitions all sub-tasks.

  • The Related issues condition checks the state of related issues, for example, if all linked issues are closed.

In order for a rule to work with an issue in another project, it must be able to execute in the projects the issue is in, either being a multi-project or global rule.

When configuring automation rules, it's possible to perform actions against related issues – this is referred to as branching. This is in reference to the rule no long executing in a linear fashion, but instead expanding out to multiple paths.

Jira のブランチ ルール設定。ドロップダウンが開いて [親] や [作成されたすべての課題] などのすべてのブランチ作成オプションが表示されます。

課題または課題のリストでルールのブランチが作成される場合、ルールのサブブランチは各課題に対して実行されます。{{issue}} に対するすべてのアクションと参照は、トリガー課題でなく関連課題をポイントします。

スマート バリュー {{triggerIssue}} を使用すると、ブランチ ルールのトリガー課題も参照できます。

ブランチの作成は以下を含む多数のユース ケースで役に立ちます。

  • 親から特定のフィールドに値をコピーして、すべてのサブタスクを同期させる。

  • Moving an Epic into In progress when a Story is moved to In progress.

  • Commenting on is blocked by linked issues when an issue is resolved.

ブランチ実行の順番を付ける

  • 複数の課題 (4 件のサブタスクなど) に対するブランチは同時に実行され、必ずしも次のブランチの開始前に前のブランチが完了するわけではありません。そのため、ブランチ間の変更に依存することはできません。

  • 複数の課題上のブランチは新規プロセスとして実行され、メインブランチはサブブランチが開始するまで実行を続けます。

作成済み課題にアクセスする

Rules can create issues using the Create issue and Clone issue actions. Performing further actions, such as adding a comment or creating sub-tasks, on these newly created issues within the same rule requires a related issue branch.

This is because the main branch of a rule always applies to the trigger issue, not the created issue. For example, adding a Comment on issue action after a Create issue action adds a comment to the trigger issue, not the created issue.

To address this, create a new branch for All created issues to allow you to action newly created issues.

Jira Automation のルール設定。ルールには [スケジュール時] トリガー、[課題を作成]、および作成されたすべての課題に対するブランチがあります。

Alternatively, you can use the Related issues condition (Most recently created) if you the only need to action a single issue.

分岐の制限

  • Nesting: Branches cannot be nested in one another, and do not support the use of the If/else block condition.

  • Isolation: Branches are isolated. Any changes that occur in a branch will not be visible to the main branch, or any others. For example, if a branch has a Create variable action, the created smart value can be used in that same branch, but can't be used in the main branch, nor in any other the other branches.

The Related issues condition checks the state of related issues before progressing a rule.

Jira Automation の [関連する課題] 条件のスクリーンショット。

この条件は幅広いユース ケースで使用可能であり、たとえば次の内容の確認に使用されます。

  • 課題に特定タイプのリンク済み課題があるかどうか

  • 課題に親またはエピックがあるかどうか

  • スプリント/バージョンの課題の中に割り当てされていないものがあるかどうか

  • エピック内のすべてのストーリーが解決済みの場合。

  • 特定タイプの解決済みサブタスクに特定の値セットがあるかどうか

  1. 関連の課題タイプを選択します。

    • サブタスク

    • ストーリー (または、このエピックのその他の課題)

    • エピック

    • 作成した課題

    • 紐づく課題

  2. 関連課題が次の状態かどうかを確認する条件を選択します。

    • 存在する

    • 存在しない

    • すべて指定 JQL と一致する

    • いずれも指定 JQL と一致しない

    • 一部が指定 JQL と一致する

  3. [保存] を選択します。

詳細

Check out how we use related issues in our Jira automation template library.

さらにヘルプが必要ですか?

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