自動化スマート値 - ユーザー
Jira Automation テンプレート ライブラリでスマート バリューを使用する方法をご確認ください。
以下のスマート バリューを利用して、ルール設定時にユーザー データにアクセスし、形式を設定できます。
ユーザーのプロパティ
次のプロパティはすべてのユーザー向けスマート バリューでアクセス可能です。
accountId: the unique ID of the user, set by Jira. It is not possible to change this ID. Learn more about converting usernames to user account IDs.
active: ユーザー アカウントがアクティブかどうか
avatarUrls: サイズが 16x16、24x24、32x32、48x48 のユーザー アバターにアクセスできます
displayName: ユーザーのプロファイル内の氏名
emailAddress: ユーザーのプロファイルに記載されているメール アドレス
タイムゾーン: Atlassian Cloud サイトの既定のタイムゾーン。
If a profile information is not made accessible to you, then smart values won’t return any value. For example, if the visibility of the user’s email address is set to Only you and admins in Profile and visibility, then the emailAddress
smart value will not return any value.
例
{{creator.displayName}}
{{comment.author.displayName}}
{{reporter.emailAddress}}
{{assignee.timeZone}}
{{assignee.accountId}}
{{assignee.avatarUrls."48x48"}}
{担当者}
アクティブな課題の担当者です。
{{assignee.displayName}}
{comment.author}
課題にコメントを追加するユーザー。
{{comment.author.displayName}}
{作成者}
アクティブな課題の作成者。課題の作成者は変更できません。
{{creator.displayName}}
{開始者}
ルールをトリガーしたユーザー。
{{initiator.displayName}}
{{initiator.emailAddress}}
{{initiator.accountId}}
{{initiator.timeZone}}
{{initiator.locale}}
{報告者}
アクティブな課題の報告者。
{{reporter.displayName}}
{カスタム フィールド}
ユーザー選択カスタムフィールドに関連する情報にアクセスするには、{{ と }} の間にフィールド名を入力してください。たとえば、"Squad leader" というカスタム フィールドがあり、そのユーザーの表示名にアクセスする場合は次のように入力します。
{{Squad leader.displayName}}
他のユーザーをメンションする方法
特定のユーザーをメンションする
自動化ルールで別のユーザーをメンションするには、そのユーザーのアカウント ID が必要です。ユーザーのプロファイルにアクセスして URL の末尾を見ることでアカウント ID を確認できます。
次に、以下を入力する必要があります。
[~accountId:their account ID]
例:
[~accountId:557057:1d4fd7f4-bbac-4466-82ee-aaabbbccc]
// returns
@Alana Grant
フィールドでユーザーをメンションする
課題の担当者など、特定のフィールドのユーザーをメンションするには以下を入力します。
[~accountId:{{user field name.accountId}}]
たとえば「Squad leader」というユーザー カスタム フィールドがあり、該当者をメンションする場合は、次のように入力します。
Hi [~accountid:{{Squad leader.accountId}}], could you please assign this bug to someone on your team?
//returns
Hi @Alana Grant, could you please assign this bug to someone on your team?
Slack でユーザーをメンションする
ユーザーをメンションする自動化ルールを構築して、Slack のユーザーにダイレクト メッセージを送信できます。Slack における自動化の使用に関する詳細をご確認ください。
エンティティのプロパティ
エンティティのプロパティは、Jira のユーザーに対して設定できる任意のキーと値のペアです。ユーザーは、2 つのタイプのエンティティのプロパティを使用できます。
{{reporter.properties}}
// e.g. if 'financeAccountId' is an entity property set
// programmatically by another app
{{reporter.properties.financeAccountId}}
エンティティのプロパティは、/rest/api/3/user/properties
REST API を使用した API 呼び出しを介してのみ設定できます。これは [設定] > [ユーザー管理] > [詳細を表示] > [Jira プロパティを編集] にある従来の [ユーザー プロパティ] 機能と同じではありません。
また、プロジェクト管理者が API を操作しなくても、ルール ビルダー UI から設定できる [エンティティ プロパティを設定] アクションもあります。
この内容はお役に立ちましたか?