Automation For Jira - How to write a rule that moves issues to the Epic issue type from a different type

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

このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。

*Fisheye および Crucible は除く

要約

When a user tries to bulk move issues from a certain type (Story, Bug, Feature...) to the Epic issue type, the Bulk Update functionality forces the user to give a value to the Epic Name field, as it is a mandatory field for Epics:


The problem is that:

  • the Epic Name field does not exist for other issue types
  • as a result, this field is empty and is forced to be manually set to random value, which will applies to all issues moved during the bulk update
  • it is not possible to populate this field with the content of other fields, when using the Bulk Update feature

The purpose of this article is to describe how to configure a rule using Automation For Jira to workaround the Bulk Update feature limitation.

環境

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

ソリューション

Preliminary step

(warning) For the automation rule to work, it is mandatory that both the source issue type and the Epic issue type are associated to the same workflow within the project. If both issue types are using different workflows, the automation rule will fail to execute.

If both issue types are using different workflows, edit the workflow scheme associated to the project both issue types belong to, so that they are both using the same workflow. For more information about how to configure workflow schemes, refer to the documentation Configuring workflow schemes.

Configuration the automation rule

Here is how the rule should be configured:

  • Trigger: Use the "Scheduled" trigger, with the settings below:
    • Fixed rate of every: you can choose 10 days for now, it does not matter as we want the rule to be executed only once
    • When rule executes...: select the option run a JQL search and pass results to subsequent conditions and actions
    • JQL: enter the JQL query of your choice, which allows you to search for all the issues that need to be moves
    • (warning) Untick the option Only include issues that have changed since the last time this rule executed 
  • Add the Action "Edit Issue Fields"
    • Select Issue Type as the field to update
    • Set it to "Epic"
  • Add the Action "Re-fetch issue data"
  • Add the Action "Edit Issue Fields"
    • Select Epic Name as the field to update
    • Inside the "Epic Name" field, enter the following string:
      {{issue.summary}}
      

After you configure the rule:

  • Save the rule
  • Use the button Run Rule to execute it once
  • Check the Audit Logs page of the rule to verify that it was successful
  • Disable the rule, in case you don't need to the rule to be executed again in the future (in case you were only planning to perform the Move operation once)

Here is a screenshot showing what the rule would look like:



最終更新日 2024 年 8 月 20 日

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

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