Automation For Jira - How to create a rule that counts the number of sub-tasks that belong to an issue
プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。
このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。
*Fisheye および Crucible は除く
要約
This article describes how to create an Automation Rule using the Lookup Issues action available in Automation for Jira from the version 9.0.1, which will perform the following actions:
- Calculate the number of sub-tasks that belong to a Jira issue
- Add this value to a number field in the issue
環境
- Jira Data Center Only (This article does not apply to Jira Server licenses)
- Applicable Jira / A4J (Automation for Jira) versions:
- Jira 9.11.0 and any higher version (this Jira version ships with A4J 9.0.1)
- OR Jira 8.20.0 and any higher version, in combination with A4J 9.0.1
ソリューション
Preliminary step
Create a new custom field of number type via the page ⚙ > Issues > Custom Fields.
ルール構成
The rule can be configured as follows:
- Trigger: "Scheduled", with the parameters below:
- Rate: every 10min
- JQL: copy the JQL used by the gadget filter
- Untick the option Only include issues that have changed since the last time this rule executed
- Action: "Lookup Issues", with the parameter below:
- JQL:
parent = {{triggerIssue.key}}
- JQL:
- Action: "Edit Issue", with the parameters below:
- Select the Custom Number Field in the list of fields to edit
- Copy the syntax below:
{{lookupIssues.size}}