Automation For Jira - How to write a rule to close a parent issue after all sub-tasks have been closed

お困りですか?

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

コミュニティに質問

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 は除く

    

要約

When a parent issue (for example Task/Bug/Story type issue...) has sub-tasks underneath it, we might want to automatically close it once all the sub-tasks have been closed.

The purpose of this article is to provide a way to configure an automation rule that will automatically close the parent issue, once the last sub-task was closed.

環境

  • Jira Service Management (JSM) Server / Data Center の 4.0.0 以降のバージョン
  • Automation for Jira 7.4.0 以降のバージョン

ソリューション

自動化ルールの構成

  • Add an Issue Transitioned trigger with the parameters below:
    • From Status: leave empty
    • To Status: choose the workflow status that issues enter when they are closed/done. For example: the status DONE
  • Add an Issue Field Condition with the parameters below:
    • Field: Issue Type
    • 条件: イコール
    • Value: Sub-task
  • Add a Branch Rule with the parameter below:
    • Type of related Issues: Parent
  • Inside the Branch Rule, add the 2 components below:
    • Add a Related Issues Condition with the parameters below:
      • Related Issues: Sub-tasks
      • Condition: "All match specified JQL"
      • Matching JQL: "status = DONE"
        • (info) Make sure to change the status to the one used in the workflow when an issue is closed (for example: Closed, Resolved, etc...)
    • Add a Transition Issue action with the parameters below:
      • Transition the issue by: "Selecting the destination status"
      • Destination status: DONE 
        • (info) Make sure to change the status to the one used in the workflow when an issue is closed (for example: Closed, Resolved, etc...)

Screenshot of the automation rule


最終更新日 2024 年 5 月 23 日

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

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