Automation for Jira Data Center - How to change the visibility of internal comments to public immediately upon creation

 

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

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

*Fisheye および Crucible は除く

 

要約

The scope of this knowledge article is to provide an automation rule example that converts internal comments into public ones immediately after creation.

This will be accomplished with a "Send web request" action that uses the specific REST API endpoint for updating comments and adjust their visibility.

環境

Automation for Jira 8.0.0 以降のバージョン。

ソリューション

The automation rule can be configured as described below.

自動化ルールの構成

  • New Trigger > Issue commented
  • New condition > Advanced compare condition
    • First value: comment.internal
    • Condition: equals
    • Second value: true
  • New action > Send web request
    • Webhook URL (replace the address with your Jira Base URL):
https://jirabaseurl/jira/rest/api/2/issue/{{issue.key}}/comment/{{comment.id}}
    • Headers:
      • Content-Type: application/json
      • Authorization: Basic base64_auth_string
        (See below how to generate the auth string).
    • HTTP method: PUT
    • Webhook body: Custom data

      {
      "body": "{{comment.body}}",
      "properties": [
           {
             "key": "sd.public.comment",
             "value": {
                "internal": false
      }}]
      }

 To generate the authentication string, you can use any online tool to encode the string "username:password" using base64. Alternatively, you can execute the following command in a Linux terminal, replacing the user and password with those of the user who performs the action:

echo -n 'admin:password' | base64

Screenshot of the rule

最終更新日: 2024 年 10 月 9 日

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

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