Automation For Jira - Writing a rule that sends an email with the list of open issues per team in a Roadmap Plan

お困りですか?

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

コミュニティに質問

robotsnoindex

 

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

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

*Fisheye および Crucible は除く

要約

This article describes how to create an Automation Rule which will send an email containing the list of open issues within an Advanced Roadmap plan, and separated by Team involved in the plan.

ここでは、次のように仮定します。

  • you are using Advanced Roadmap to manage a plan where issues are assigned to different teams, as illustrated below:
  • you are a project manager responsible for this plan, and you would like to get a daily summary by email showing 2 separate lists open issues (1 list for each team)

The automation rule described in this article will cover this use case.

環境

  • Jira Software Data Center Only (This article does not apply to Server licenses)
  • Advanced Roadmap Plans
  • 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

ソリューション

最初のステップ

First, we need to prepare the JQL queries which will be used to identify the list of opened issues for each team.

Due to the Advanced Roadmap limitation described in the feature request JQL Search for Team does not Recognize Team Names, it is not possible to write a JQL query to search for issues using the Team Name. Instead, the JQL query relies on the Team ID.

Because of this limitation, it is necessary to retrieve from the Jira DB the ID of each team, using the SQL query below:

select * from "AO_82B313_TEAM";

In the example below, we can see that:

  • the ID of "Team 1" is 3
  • the ID of "Team 2" is 2

As a result, to get the list of opened issues (=unresolved issues) for each Team, the JQL queries below will be used in the Automation Rule:

  • List of opened issues from "Team 1" (ID = 3, as per the Database query)

    Team = 3 AND resolution is empty
  • List of opened issues from "Team 2" (ID = 2, as per the Database query)

    Team = 2 AND resolution is empty

Rule configuration details

The rule will be configured as described below:

  • Add the Scheduled trigger with the settings below:
    • Frequency: Once per day
    • Select the option simply run the conditions and actions without providing issues
  • Add the Lookup issues action with the JQL below ((warning) make sure to adjust the query based on the Team ID retrieved from the Database):

    Team = 3 AND resolution is empty
  • Add the Create variable action with the parameters below. (info) Note that Variable names can only include alphabetic characters.
    • Variable Name: backlogTeamOne
    • Smart Value:

      {{#lookupIssues}}<tr><td><a href="{{url}}">{{key}}</a></td><td><a href="{{url}}">{{summary}}</a></td><td><em>{{assignee.displayName}}</em></td></tr>{{/}}
  • Add the Lookup issues action with the JQL below ((warning) make sure to adjust the query based on the Team ID retrieved from the Database):

    Team = 2 AND resolution is empty
  • Add the Create variable action with the parameters below. (info) Note that Variable names can only include alphabetic characters.
    • Variable Name: backlogTeamTwo
    • Smart Value:

      {{#lookupIssues}}<tr><td><a href="{{url}}">{{key}}</a></td><td><a href="{{url}}">{{summary}}</a></td><td><em>{{assignee.displayName}}</em></td></tr>{{/}}
  • Add the Send email action with the settings below:
    • In More Options, untick the option Convert line breaks to HTML line breaks 

    • To: Choose the recipient of your choice

    • Subject: You can use the suggestion below:

      Backlog from each Team
    • Content: You can use the suggestion below, which will list all the issues along with their URL and summary, and divided by Team

      <h2>Backlog from each Team</h2>
      
      <h3>Backlog from Team 1</h3>
      <table border="0" cellspacing="0" cellpadding="2">
      <thead>
      <tr>
      <th align= "left">Key</th>
      <th align= "left">Summary</th>
      <th align= "left">Assignee</th>
      </tr>
      </thead>
      <tbody>
      {{backlogTeamOne}}
      </tbody>
      </table>
      
      <h3>Backlog from Team 2</h3>
      <table border="0" cellspacing="0" cellpadding="2">
      <thead>
      <tr>
      <th align= "left">Key</th>
      <th align= "left">Summary</th>
      <th align= "left">Assignee</th>
      </tr>
      </thead>
      <tbody>
      {{backlogTeamTwo}}
      </tbody>
      </table>

Screenshot of the rule


Example of email sent by the rule





最終更新日 2024 年 6 月 3 日

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

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