スマート バリュー - 全般

Jira のプロセスとワークフローを自動化する

このページの内容

お困りですか?

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

コミュニティに質問

スマート バリューを使用すると、Jira 内の課題データにアクセスできます。たとえば、次のスマート バリューを使用して、課題のキーとようやくを記載した Slack メッセージを送信できます: {{issue.key}} {{issue.summary}}

スマート バリューが何を返すかをテストするには、ログ操作とともに手動トリガーを使用します。結果は以下のように監査ログに表示されます。



ルール設定時には以下のスマート バリューが使用できます。

Check out how we use smart values in our Jira automation template library.


{{issue.[property]}}

The issue smart values are used to access information related to the rule’s active issue, which is the issue the rule is currently acting on.

The information that you can access on the issue are described in the Available properties section below. Some issue properties are more complex, and they’ve been described in their own sections on this page.

 Learn how to use these to interact with Jira’s REST API.

利用可能なプロパティ

課題フィールド

  • {{issue.description}} - Returns the content in the issue's Description field.
  • {{issue.key}} - Returns the issue's key, which is a unique identifier comprised of the project key and the issue's number. For example, PROJ-123
  • {{issue.status}} - Returns the issue's status
  • {{issue.status.name}} - Returns the issue's status
  • {{issue.summary}} - Returns the issue's summary
  • {{issue.versions}} - Returns the issue's Affects versions
  • {{issue.issueType.name}} - Returns the issue's type, for example StoryBug, or Task.
  • {{issue.resolution}} - Returns the issue's resolution.
  • {{issue.updated}} - Returns the date the issue was updated. Can be combined with other date and time smart values. Learn more about date and time smart values.

  • {{issue.Story Points}} - Returns the issue's story point estimate (company-managed Jira Software Cloud only).

  • {{issue.Story Points estimate}} - Returns the issue's story point estimate (team-managed Jira Software Cloud only).

課題の日付

These can be combined with other date and time smart values. Learn more about date and time smart values.

  • {{issue.created}} - Returns the issue's creation date
  • {{issue.duedate}} - Returns the issue's due date.

Issue users

These can be combined with other user smart values. Learn more about user smart values.

  • {{issue.assignee.displayName}} - Returns the issue's assignee.
  • {{issue.reporter.displayName}} - Returns the issue's reporter. 

{{issue.[Custom Field]}}

Similar to {{issue.[property]}}, you can also access custom field information on your issues.

利用可能なプロパティ

  • {{issue.[Custom Field].id}} - Returns the unique id for the field assigned by Jira. It is better to use this than name as it cannot be changed.

  • {{issue.[Custom Field].description}} - Returns the text displayed below the custom field viewed in the Simple Search column.
  • {{issue.[Custom Field].name}} - Returns the visible label displayed on the left of the field.
  • {{issue.[Custom Field].defaultValue}} - Returns the value displayed on first view of the field.

In the example below, we have a custom field called Team Leader, and the value of the field is currently Alana Grant

{{issue.Team Leader}}

//returns

Alana Grant

{{issue.affectedServices}}

For Jira Service Management requests only. Accesses the values in an issue's Affected services field. Learn more about services in Jira Service Management.

Because this smart value deals with multiple items (i.e: issues can have many fix versions), it can be used with the # symbol to apply the rule to each individual fix version. Learn more about using smart values with sections and lists.

利用可能なプロパティ

  • {{issue.affectedServices.name}} - Returns the names of the issue's Affected services.

  • {{issue.affectedServices.tier}} - Returns the tiers of the issue's Affected services.
  • {{issue.affectedServices.changeApprovers}} - Returns the account ID of all change approvers of the issue's services. Can be combined with other user-related smart values. For example, {{issue.affectedServices.changeApprovers.displayName}} will return their names. Learn more about user smart values.
  • {{issue.affectedServices.dependentServices}} - Returns the list of services that this issue's services depend on. The three properties above can also be added to this, for example, {{issue.affectedServices.dependentServices.tier}} will return the dependent services' tiers.

{{issue.comments}}

Returns the issue's comments. Because this smart value deals with multiple items (i.e: issues usually have many comments), it can be used with the # symbol to apply the rule to each individual comment. Learn more about using smart values with sections and lists.

利用可能なプロパティ

  • {{issue.comments.last.body}} - Returns the body of the last comment.
  • {{issue.comments.first.body}} - Returns the body of the first comment.
  • {{issue.comments.reverse.body}} - Returns the issue's comments, in reverse order.
  • {{issue.comments.size}} - Returns the number of comments on the issue.
  • {{issue.comments.author.displayName}} - Returns the comment authors.

In the following example, we list each comment that an issue has, and include the author and creation date/time:

{{#issue.comments}}
Comment by: {{author.displayName}} at: {{created}}
{{body}}
{{/}}


//returns


Comment by: Alana at: 2019-05-30T15:36:02.3+0000
Hey team, how are we tracking on this task?


Comment by: Jose at: 2019-05-30T15:40:57.0+0000
We'll be ready to ship at the end of the week.

Comment by: Alana at: 2019-05-30T15:44:15.7+0000
Great, thanks for the update!


In this example, we return the name of the person who added the last comment on an issue:

{{issue.comments.last.author.displayName}} has left a comment on the issue.


//returns


Alana Grant has left a comment on the issue.

{{issue.components}}

Used to access the values in an issue's Components field. Because this smart value deals with multiple items (i.e: issues can have many components), it can be used with the # symbol to apply the rule to each individual component. Learn more about using smart values with sections and lists.

利用可能なプロパティ

  • {{issue.components.name}} - Returns the values in the issue's Component field.

{{issue.epic}}

Used to access information about an issue's epic. This smart value only works for issues that have been added to an epic.

利用可能なプロパティ

  • {{issue.epic.key}} - Returns the epic's key, e.g. PROJ-213

  • {{issue.epic.status.name}} - Returns the epic's status, e.g. In progress

  • {{issue.epic.[Custom Field]}} - Returns the value in an epic's custom field. For example, if the epic has a custom field called Initiative, then {{issue.epic.Initiative}} will return the value in the Initiative field.

{{issue.fixVersions}}

Used to access the values in an issue's Fix Versions field. Because this smart value deals with multiple items (i.e: issues can have many fix versions), it can be used with the # symbol to apply the rule to each individual fix version. Learn more about using smart values with sections and lists.

利用可能なプロパティ

  • {{issue.fixVersions.name}} - Returns the name of the fix version.
  • {{issue.fixVersions.description}} - Returns the description of the fix version.
  • {{issue.fixVersions.archived}} - Returns true if the fix version is archived, and false if not.
  • {{issue.fixVersions.released}} - Returns true if the fix version is released, and false if not.
  • {{issue.fixVersions.releaseDate}} - Returns the fix version's release date. Can be combined with other date and time smart values. Learn more about date and time smart values.

In the below example, we list each fix version that the issue has been added to, followed by the version's release date, in bullet point form.

This issue is part of the following releases:
{{#issue.fixVersions}}
* Fix version: {{name}}, released on {{releaseDate}}
{{/}}


// returns

This issue is part of the following releases:
• Fix version: Version 1.1, released on 2019-08-10T00:00:00.0+0000
• Fix version: Version 1.5, released on 2019-08-02T00:00:00.0+0000

{{issue.latest}}

Prints the issue key and its status (e.g.: To doIn progress, or Done).

Available properties:

  • {{issue.latest.description}} - Returns the status's description.


このスマート バリューにはコストのかさむ課題データのリロードが必要です。後続アクションが課題の最新ステータスを把握する必要がある状況でのみ使用してください。たとえば、課題を編集アクション 2 件がフィールドの値を上書きではなく追加する必要がある場合などです。

{{issue.parent}}

Accesses the details of a subtask's parent issue. Can only be used when the active issue is a subtask, and can't be used to access a standard issue's parent issue.

Available properties:

  • {{issue.parent.key}} - Returns the issue key of the subtask's parent issue.

  • {{issue.parent.priority.name}} - Returns the priority of the subtasks's parent issue.
  • {{issue.parent.Epic Link}} - Returns the issue key of the parent issue's epic.
  • {{issue.parent.epic.summary}} - Returns the summary of the parent issue's epic.

{{issue.properties}}

Accesses any issue property. Properties are frequently used by add-ons and integrations to store values, e.g.: {{issue.properties.some.value}}.

{{issue.Request Type}}

Accesses information from Jira Service Management requests.

Available properties:

  • {{issue.Request Type.requestType.name}} - Returns the customer request type.
  • {{issue.Request Type.currentStatus.status}} - Returns the status of the current request.
  • {{issue.Customer Request Type}} - Returns the customer request type for older Jira instances.

{{issue.security}

セキュリティ レベルのテキストです。

Available properties:

  • {{issue.security.name}} - Returns the security level name.

  • {{issue.security.id}} - Returns the security level ID.

{{issue.url}}

The URL to access the issue. Also provides the customer portal URL for Jira Service Management requests.

Available properties:

  • {{issue.url}} - Returns the URL of the issue.
  • {{issue.url.customer}} - Returns the customer portal URL (for Jira Service Management requests)

{{issue.versions}}

Accesses the value in the issue's Affects versions field. Because this smart value deals with multiple items (i.e: issues can have many Affects versions), it can be used with the # symbol to apply the rule to each individual component. Learn more about using smart values with sections and lists.

Available properties:

  • {{versions.name}} - Returns the name of the affects version
  • {{versions.description}} - Returns the description of the affects version.
  • {{versions.archived}} - Returns true if the affects version is archived, and false if not.
  • {{versions.released}} - Returns true if the affects version is released, and false if not.
  • {{versions.releaseDate}} - Returns the affects version's release date. Can be combined with other date and time smart values. Learn more about date and time smart values.

In the example below, the issue's first affects version's release date is printed:

The bug was first discovered in the version released on {{issue.versions.first.releaseDate}}.

{{issue.watchers}}

Accesses the current watchers of an issue. Because this smart value deals with multiple items (i.e: issues can have many watchers), it can be used with the # symbol to apply the rule to each individual component. Learn more about using smart values with sections and lists.

Available properties:

  • {{issue.watchers.displayName}} - Returns the watcher's display name.

  • {{issue.watchers.emailAddress}} - Returns the watcher's email address.

The example below lists each person watching the issue - both their display name and their email address - in bullet point form.

The following people are watching this issue:
{{#issue.watchers}} 
* Name: {{displayName}}, Email: {{emailAddress}}
{{/}}

// returns

The following people are watching this issue:
• Alana, alana@acme.com
• Jose, jose@acme.com

{{lookupIssues}}

Returns a list of issues from a JQL search caused by the Lookup issues action.

Available properties:

  • {{key}} - 課題キーを返します

  • {{url}} - Returns the issue url

  • {{summary}} - Returns the issue summary

  • {{assignee.displayName}} - 担当者を返します。

  • {{reporter.displayName}} - 報告者を返します。

  • {{status}} - ステータスを返します。

  • {{issueType.name}} - 課題タイプを返します。

  • {{resolution}} - Returns the resolution status

  • {{fixVersion}} - Returns the fix version

  • {{created}} - Returns the date the issue was created

  • {{updated}} - 課題の更新日を返します。

  • {{Story Points}} - Returns the story points for the issue (company-managed Jira Software)

  • {{Story point estimate}} - Returns the story points for the issue (team-managed Jira Software)

The following example prints all the issue keys returned from the JQL search, in bullet point form.

Hey team - we've got the following issues left in this sprint:
{{#lookupIssues}}
* {{key}}
{{/}}


The following example sums all of the story points for issues returned from the JQL search.

There are {{lookupIssues.Story Points.sum}} story points remanining.

{{triggerIssue}}

Refers to the original issue that triggered the rule; used when you branch the chain. Used with the Related issues condition. All properties available to {{issue}} are also available on this smart value.

{{attachment}}

Accesses information related to a file attachment on an issue.

Available properties:

  • {{attachment.filename}}: Returns the filename of the attachment.

  • {{attachment.mimeType}}: Returns the file format of the attachment.

  • {{attachment.created}}: Returns the date and time the attachment was added to the issue.

  • {{attachment.size}}: Returns the attachment file size in bytes.

  • {{attachment.author}}: Returns the user who added the attachment. 

    • {{attachment.author.accountId}}: Returns the ID associated with the user name.

    • {{attachment.author.emailAddress}}: Returns the email address associated with the user name.

    • {{attachment.author.displayName}}: Returns the name displayed in your Jira instance.

    • {{attachment.author.active}}: Returns true if their account is active, and false if not.

    • {{attachment.author.timeZone}}: Returns the timezone the user is registered being in; this doesn't change dynamically based upon where the user logs in from, it is the timeZone registered in their user account.

{{baseUrl}}

Jira インスタンスの URL を表示します。

{{changelog}}

  • Used with: any triggers that edit an issue. 

This smart value accesses the changelog, and a list of changes for each field. For example, when an issue is transitioned you can see what status the issue transitioned from.

 Learn more about using smart values with sections and lists.

利用可能なプロパティ

  • {{changelog.summary}} - Changelog information for the Summary field.
  • {{changelog.issuetype}} - Changelog information for the Issue type field. 
  • {{changelog.status}} - Changelog information for the Status field.

This example returns the new value of an issue's Summary field after it has been changed.

{{#changelog.summary}}
  {{toString}}
{{/}}


This example returns an issue's previous type, after it has been changed.

{{#changelog.issuetype}}
  {{fromString}}
{{/}}


This example shows the previous status for issues that are transitioned.

{{#changelog.status}}{{fromString}}{{/}}


This example shows the previous status id (for use in another Edit action)

{{#changelog.status}}{{from}}{{/}}

{{comment}}

This value won't work for any other trigger, even if a comment was added as a result (e.g. - the Issue transitioned trigger).

利用可能なプロパティ

  • {{comment.body}} - Returns the body of the comment that triggered the rule.
  • {{comment.author}} - Returns the ID of comment's author.
  • {{comment.created}} - Returns the date and time of the comment.
  • {{comment.visibility.type}} - Returns the comment restriction type if any, e.g. role.
  • {{comment.visibility.value}} - Returns the comment restriction label if any, e.g. Developers.
  • {{comment.internal}} - for Jira Service Management comments, returns false if the comment is visible to customers.
  • {{comment.properties}} - Accesses any comment property. Properties are frequently used by add-ons and integrations to store values.
  • {{comment.properties."sd.public.comment".internal}}

In the below example, we're sending out a notification that someone has added a comment to an issue, perhaps as a Slack message.

Hey team, {{comment.author.displayName}} has left the following comment on {{issue.key}}:
{{comment.body}}


// returns


Hey team, Alana Grant has left the following comment on PROJ-12:
Could I get an urgent update on this please?

{{comment.id}}

Used by triggers that involve adding a comment, such as Issue commented, Issue transitioned, or Issue updated. The comment that triggers the rule is stored in this smart value.

{{createdIssue}}

Accesses the previous issue created in the rule. 

利用可能なプロパティ

Any property used with the {{issue}} smart value can also be used with {{createdIssue}}

{{createdIssues}}

ルールで作成された課題のリストです。 

利用可能なプロパティ

Any property used with the {{issue}} smart value can also be used with {{createdIssue}}.  Learn more about using smart values with sections and lists.

{{#createdIssues}}{{key}}{{/}}

{{eventType}}

The type of event that triggered the rule. For example, jira:issue_updated :issue_commented.


{{fieldChange}}

Available anywhere smart values are supported, to access the value of a field that has changed. For example, if the Assignee of a field changes, you could add a comment to the issue to note who the previous assignee was, and who the new assignee is.

When there are multiple fields that have changed, {{fieldChange}} only contains the first changed value. If multiple values are changed, use # to iterate over these. For example, when setting multiple Fix Versions, then you can iterate over these using {{#changelog.fixVersion}}{{toString}}Learn more about using smart values with sections and lists.

利用可能なプロパティ

  • {{fieldChange.fromString}} - Returns the previous value as displayed.
  • {{fieldChange.toString}} - Returns the new value as displayed.
  • {{fieldChange.from}} - Returns the previous raw value, e.g. for a select field. 
  • {{fieldChange.to}} Returns the new raw value, e.g. for a select field.

{{rule}}

Accesses information for the current running rule.

利用可能なプロパティ

  • {{rule.name}} - Returns the name of the rule that is currently running.

  • {{rule.actor}} - Accesses the rule actor user.

{{Sprint}}

Accesses information relating to the sprint that triggered the rule.

利用可能なプロパティ

  • {{sprint.id}} - Returns the sprint ID.

  • {{sprint.name}} - Returns the sprint name.
  • {{sprint.isStarted}} - Returns true if the sprint has started, and false if not.
  • {{sprint.isClosed}} - Returns true if the sprint has closed, and false if not.
  • {{sprint.startDate}} - Returns the start date of the sprint.
  • {{sprint.endDate}} - Returns the end date of the sprint.
  • {{sprint.completeDate}} - Returns date the sprint was marked as complete.
  • {{sprint.originBoardId}} - Returns the ID of the board the sprint belongs to.
  • {{sprint.goal}} - Returns the sprint goal.

{{version}}

Accesses information for the version that triggered the rule.

Available properties:

  • {{version.name}} - Returns the version's name.
  • {{version.id}} - Returns the version's ID.
  • {{version.description}} - Returns the version's description.
  • {{version.archived}} - Returns true if the version is archived, and false if not.
  • {{version.startDate}} - Returns the version's start date.
  • {{version.released}} - Returns true if the version is released, and false if not.
  • {{version.releaseDate}} - Returns the version's releae date
  • {{version.project.key}} - Returns the project key of the project the version belongs to.
  • {{issue.versions.first.name}} - 

{{webhookData.[value].[childValue]}}

Allows access to data that was sent along with the incoming webhook, for example, the body of the webhook request.

{{webhookResponse}}

On successful request, you will be able access webhook response data using the available smart values. If you have multiple webhook responses, you can add the # symbol to apply the rule to each individual response. Learn more about using smart values with sections and lists.

Available properties:

  • {{webhookResponse.status}} - response code e.g. 200
  • {{webhookResponse.headers}} - headers that can be accessed with dot nation
  • {{webhookResponse.headers.Content-Type}}
  • {{webhookResponse.body}} - body that can be accessed with dot nation
  • {{webhookResponse.body.name}}
  • {{webhookResponses}} - list of responses made when list operations
  • {{webhookResponses.last.body}}

This is how you would return multiple responses using the smart value:

{{webhookResponses.last.someValue.childValue}}
{{#webhookResponses}}
    Data from response: {{someValue.childValue}}
{{/}}

{{worklog}}

Accesses information for a worklog entry that has just been logged against an issue.

利用可能なプロパティ

  • {{worklog.comment}}
  • {{worklog.started}}
  • {{worklog.timeSpentSeconds}}
  • {{worklog.timeSpent}}
  • {{worklog.visibility}} - available when the worklog is restricted
  • {{worklog.visibility.type}} - available when the worklog is restricted
  • {{worklog.visibility.value}} - available when the worklog is restricted

{{issue.InsightField}}

インサイト フィールドの正式名、キー、または要約にアクセスします。

利用可能なプロパティ

  • {{issue.InsightField}} - Returns the issue summary and issue key
  • {{issue.InsightField.key}} - 課題キーを返します
  • {{issue.InsightField.summary}} - Returns the issue summary

{{issue.TempoAccountField}}

Tempo アカウント フィールドのプロパティにアクセスします。

利用可能なプロパティ

  • {{issue.TempoAccountField}} - Returns the name of the account
  • {{issue.TempoAccountField.id}} - Returns the ID of the account
  • {{issue.TempoAccountField.name}} - Returns the name of the account
  • {{issue.TempoAccountField.value}} - Returns the name of the account


既定値

If a field or value doesn't exist, it will return an empty value: {{invalid reference}}. You can specify a default value to prevent this.

For example, when invalid reference doesn't contain a value, you can print Hello world using {{invalid reference|"Hello world"}}.


Last modified on Mar 1, 2024

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

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