How to create generic table with ticket data in multiline text field using automation.

お困りですか?

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

コミュニティに質問


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

要約

This article guides users on creating a dynamic table in a custom field(Description, comment, etc) ideal for collating and presenting information from multiple issues. One such use case is when you would like to have list of all linked issues summarised in a table.

ソリューション

This can be achieved by creating an automation rule based on the following scenarios.

Scenario 1: When issue keys are already in list format.

In a situation where an automation rule in Jira generates a list of issue keys using the "Lookup Issues" action, please follow these steps: 

Generate the issue key list using lookup issues

  • Trigger: Issue Created
  • Add Action: Lookup issue and filter the tickets using JQL:
    • JQL: issuetype = bug
  • Use {{lookupIssues}}  to get the result
  • Add the Edit issue action and select multiline text field(Description, comment, etc), then use the below format to generate the table.

Formatted Code:

||*Ticket*||*Summary*||*CF value*||*Status Name*||
{{#lookupIssues}}
|{{.}}| {{Summary}}| {{single list}}|{{status.name}}|
{{/}}

Automation rule:

Scenario 2: When the issue keys are stored in a field.

  • Trigger: Field value changed - select the field in which values are stored
  • Add Action: Send a web request and use the API endpoint to extract the ticket information: Search for issues using JQL (POST)

    • Pass the field name that stores the issue key

      Method:Post 
      URL: https://<your site>.atlassian.net/rest/api/3/search
      DATA {
          "jql": "Issuekey in ({{issue.<field name>.trim()}})"
           }
  • Add Edit issue action: Select the multiline field(Description, comment, etc) and use the below code to generate the able.

Formatted Code:

||*Ticket*||*Summary*||*CF value*||*Status Name*||
{{#webResponse.body.issues}}
|{{key}}| {{fields.Summary}}| {{fields.customfield_10077}}|{{fields.status.name}}|
{{/}}

Automation Rule:

This is how the results should look like :

Contact support if you have any additional questions https://support.atlassian.com/ja/contact 


最終更新日: 2024 年 1 月 18 日

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

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