Automation for Jira - how to trigger a rule when a Sub-task's Parent changes (sub-task is moved)

お困りですか?

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

コミュニティに質問

robotsnoindex
robotsnoindex

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

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.

*Fisheye および Crucible は除く

目的

This guide explains how to run an Automation for Jira (A4J) Server/Data Center rule when a sub-task moves from one parent to another. For example,

  • Story A
    • Subtask A
  • Story B
    • (Subtask A moved here)

環境

  • 8.0.0 以降の任意のバージョンの Jira Server/Data Center
  • Automation for Jira バージョン 7.0.0 以降

ソリューション

In A4J, the "sub-task moved parent issues" event is Issue Edited. The way we can track the sub-task moved is via the changelog  Smart Value

Therefore, we can create a rule as follows:

  • When: Issue updated
    • This is the trigger for "sub-task moved"
  • If: Issue Type equals "sub-task"
    • Check if the sub-task issue type triggered the rule
  • And: Advanced compare condition:
    • Check if:
      • {{changelog.Parent Issue.fromString}}
    • Does not equal:
      • {{changelog.Parent Issue.toString}}
    • This uses the change log smart value to check the "Parent Issue" change log entry and compare the "from" and "to" strings. If it does not match, then we know that the Sub-task has moved.
  • (example) Then: Add comment to the issue
    • You can reference the smart values for issue.key (subtask that got moved), changelog.Parent Issue.fromString (original parent) and changelog.Parent Issue.toString (new parent)


説明 This guide explains how to run an Automation for Jira Server/Data Center (A4J) rule when a sub-task's parent is changed.
製品Automation for Jira Server

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

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

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