Jira スマート バリュー - 課題
スマート値が返す内容をテストするには、ログ アクションで手動トリガーを使用すると、監査ログに結果が表示されます。
Smart values on this page:
- 課題
- issues
- issue.comments
- issue.components
- issue.epic
- issue.fixVersions
- issue.latest
- issue.parent
- issue.properties
- issue.project
- issue.Request Type
- issue.security.name
- issue.url
- issue.versions
- issue.watchers
- lookupIssues
- triggerIssue
- 添付ファイル
- ベース URL
- 変更履歴
- comment
- createdIssue
- createdIssues
- eventType
- fieldChange
- Jira Service Management の顧客満足度
- ルール
- sprint
- VERSION (バージョン)
- webhookData
- webhookResponse
- 作業ログ
- アセット フィールド
- Tempo Account フィールド
課題
アクティブな課題。ドット表記を通じて、課題タイプ、ステータス、カスタムの各フィールドにアクセスできます (これらによって Jira の API とやり取りする方法の詳細は、こちら (英語) をご覧ください)。
{{issue.components.name}}
{{issue.created.format("dd/MM/yyyy")}} - this is the date the issue was created
displayed in the format 21/03/2019
{{issue.description}} - the content in the description field
{{issue.project}} - the project this issue is a part of.
{{issue.duedate}} - this is the due date for scheduled issue
{{issue.issuetype.name}} - the name of the type of issue
{{issue.key}} - the issue's unique identifier, comprised the project key and the
issue's number
{{issue.status.name}} - the name of the status the issue is at in its workflow.
{{issue.toUrl}} - use this to display a url
{{issue.CustomField.property}} - some of these are:
* {{issue.CustomField.id}} - the unique id for the field assigned by Jira. It is
better to use this than name as it cannot be changed.
* {{issue.CustomField.name}} - the visible label displayed on the left of the
field
* {{issue.CustomField.description}} - the text displayed below the custom field
viewed in the Simple Search column.
* {{issue.CustomField.defaultValue}} - the value displayed on first view of the
field
issues
JQL 検索を実行するトリガー (一括処理するように設定された受信 Webhook トリガー、またはスケジュールされたトリガー) によって生成された課題のリスト。トリガーによって検出されたすべての課題は、課題の単一バンドルとして扱われます。これによって返された課題を数えられます。たとえば、優先度が「最高」の課題を数えてアラートを送信できます。または、同じラベル、同じ fixVersion などを持つ課題を数えられます。さらに、これはリストでも使用できます。課題が利用可能となる時期の詳細については「課題に対してルールを一括で実行する」をご参照ください。
{{#issues}}{{key}}{{/}} - the key for each issue
{{issues.size}} - count of the issues
issue.comments
アクティブな課題に関する複数のコメント (この例はスマート値の使用方法に詳述)
{{#issue.comments}}
Comment by: {{author}} at: {{created}}
{{body}}
{{/}}
{{issue.comments.last.body}}
{{issue.comments.first.body}} - the body of the first of many comments
{{issue.comments.size}} - count of comments for the issue
{{#issue.comments}}{{#first}}First:{{author.key}}{{/}}{{body}}{{/}} - prints all of the comments and only prints the first author's key
issue.components
リストとしての課題のコンポーネント。「複数値フィールドへのアクセス」をご参照ください。
{{issue.components.first.name}}
issue.epic
追加者: これは課題が追加されるたびに追加されます。
課題がエピックにある場合、epic はエピックの課題を参照します。エピックのすべてのフィールドにアクセスできます。
{{issue.epic.key}}
{{issue.epic.status.name}}
{{issue.epic.My Custom Field}}
issue.fixVersions
課題の修正バージョンのリスト。「複数値フィールドにアクセス」をご参照ください。
バージョンのプロパティには、名前、説明、アーカイブ済み、リリース済み、リリース日などが含まれます。
{{issue.fixVersions.first.releaseDate}}
issue.latest
課題の最新状態を Jira から再取得します。
{{issue.latest.description}}
ヒント
これは、課題データの負荷が高いリロードを必要とするため、使用すべきではありません。後続アクションが課題の最新ステータスを把握する必要がある状況でのみ使用してください (例: フィールド値の上書きではなく追加する必要がある [課題を編集] アクション 2 件)
issue.parent
この課題がサブタスクである場合、parent は親課題を参照します。親のすべてのフィールドにアクセスできます。
{{issue.parent.key}}
{{issue.parent.priority.name}}
{{issue.parent.Epic Link}}
{{issue.parent.epic.summary}}
issue.properties
ここで、任意の課題プロパティにアクセスできます。プロパティはアドオンや統合で値を保存するためによく使用されます。
{{issue.properties.some.value}}
issue.project
このスマート値によって、プロジェクト固有の属性にアクセスできます。
{{issue.project.key}}
{{issue.project.name}}
issue.Request Type
Jira Service Management 固有のリクエスト タイプ オブジェクト。このオブジェクトから情報を取得できます。
{{issue.Request Type}}
{{issue.Request Type.requestType.name}} - Customer request type
{{issue.Request Type.currentStatus.status}} - Current status
{{issue.Customer Request Type}} - Customer request type for older Jira instances
「リクエスト タイプ」のプレフィックスは、
Jira の旧式インスタンスでは「顧客リクエスト タイプ」である可能性があります。これを確認するには、グローバル管理セクションの [カスタム フィールド] ページに移動します。
そこには「リクエスト タイプ」または「顧客リクエスト タイプ」という名前のロックされたフィールドがあります。
issue.security.name
セキュリティ レベルのテキストです。
{{issue.security.name}}
{{issue.security.id}}
issue.url
課題にアクセスするための URL。Jira Service Management の課題用のカスタマー ポータル URL も提供します。
{{issue.url}}
{{issue.url.customer}}
issue.versions
課題の影響を受けたバージョンのリスト。「複数値フィールドにアクセス」をご参照ください。
バージョンのプロパティには、名前、説明、アーカイブ済み、リリース済み、リリース日などが含まれます。
{{issue.versions.first.releaseDate}}
issue.watchers
課題の現在のウォッチャーにアクセスします。
{{issue.watchers.displayName}}
{{issue.watchers.emailAddress}}
lookupIssues
課題のルックアップ アクションで使用された JQL 検索からの課題リストを返します。 課題のルックアップについての詳細をご確認ください。
{{lookupIssues}}
スマート値で利用できるプロパティのリストは、次のセクションに記載されています。
{{lookupIssues.<property_name>}}
スマート値には、JQL 検索からの各課題のプロパティがリスト形式で含まれます。
{{#lookupIssues}} {{/}}
構文を使用することで、JQL 検索からの課題リストを反復処理できます。
利用可能なプロパティ
LookupIssues 値の使用例
JQL 検索からのすべての課題のキー リストを作成します。
These are the issue keys found by the JQL search {{lookupIssues.key}}.
ループを使って各課題を反復処理し、キーを箇条書きの形式で印刷します。
These are the issue keys found by the JQL search:
{{#lookupIssues}}
* {{key}}
{{/}}
JQL 検索から返された課題のすべてのストーリー ポイントを合計します。
There are {{lookupIssues.Story Points.sum}} story points remaining.
JQL 検索から返された課題のストーリー ポイントの最高値を取得します。
The highest story point value is {{lookupIssues.Story Points.max}}.
triggerIssue
追加者: [関連する課題] アクション。
チェーンのブランチを作成する際に元の課題を参照します。
{{triggerIssue.description}}
... {{issue}}
で利用できるすべてのフィールドもここで使用できます。
添付ファイル
This {{attachement}}
smart value retrieves all the attachments of an issue as a list object.
To access the raw data from the attachments, use the following smart value:
{{attachment.filename}} // Provides the filename of each attachment
{{attachment.mimeType}} // Provides the file format of each attachment
{{attachment.author}} // Provides the user who added each attachment
{{attachment.author.accountId}} // Provides the ID associated with the user who added each attachment
{{attachment.author.emailAddress}} // Provides the email address associated with the user who added each attachment
{{attachment.author.displayName}} // Provides the display name associated with the user who added each attachment
{{attachment.author.active}} // Provides the status (active/inactive) of the user who added each attachment
{{attachment.author.timeZone}} // Provides the timezone of what timezone of the user who added each attachment
{{attachment.created}} // Provides the date and time each attachment was added to the issue
{{attachment.size}} // Provides the size in bytes of each attachment
You can iterate through the list of attachments added to the issue using the syntax {{#attachments}}
. Check how to use smart values with issue lists
For example, if you want to include a link to each attachment of an issue in a comment, use the expression below in the Comment on issue action:
{{#attachment}}
[^{{filename}}]
{{/}}
To include all attachments as thumbnails in a comment, use the following expression in the Comment on issue action:
{{#attachment}}
!{{filename}}|thumbnail!
{{/}}
ベース URL
Jira インスタンスの URL を出力します。
変更履歴
追加者: 課題を編集する Jira トリガー
All the fields that were changed. Each field is a list of changes. You can access useful things like the previous status during a transition. This is only available for the following triggers:
- Issue Moved
- Issue Transitioned
- Field Value change
- 課題が更新されました
- Multiple Issue Event (Issue Updated)
{{#changelog.summary}}
{{toString}}
{{/}}
{{#changelog.issuetype}}
{{fromString}}
{{/}}
// Previous status name
{{#changelog.status}}{{fromString}}{{/}}
// Previous status id (for using in another Edit action
{{#changelog.status}}{{from}}{{/}}
comment
追加者: コメントを含む Jira トリガー (例: 課題のコメント時)
{{comment.body}}
{{comment.author}}
{{comment.created}}
{{comment.visibility.type}} - comment restriction type, if any e.g. role
{{comment.visibility.value}} - 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}} - Way to access any comment property. Properties are frequently used by add-ons and integrations to store values.
{{comment.properties."sd.public.comment".internal}}
createdIssue
このルールで作成された過去の課題
{{createdIssue.some field}}
createdIssues
追加者: [課題のクローンを作成]、[課題を作成]、[サブタスクを作成] の各アクション
ルールで作成された課題のリスト
{{#createdIssues}}{{key}}{{/}}
eventType
ルールをトリガーしたイベントのタイプ (例: jira:issue_updated :issue_commented)
{{eventType}}
fieldChange
The {{fieldChange}
} smart value lets you access the value of a field that has changed. It's only available when the Field value changed trigger is used in the automation rule.
You can use the following properties for this smart value:
{{fieldChange.fromString}} // Returns the previous value as displayed.
{{fieldChange.toString}} // Returns the new value as displayed.
{{fieldChange.from}} // Returns the previous raw value of a field, i.e. the JSON representation of the value.
{{fieldChange.to}} // Returns the new raw value of a field, i.e. the JSON representation of the value.
The properties
{{fieldChange.from}}
and {{fieldChange.to}}
aren't available for all types of fields. For example, fields of type text and number will return a null value.
The
{{fieldChange}}
smart value only contains the first changed value. If multiple values are changed, such as when setting multiple Fix Versions, you can iterate over these using the expression below. Explore how to use smart values with issue lists
{{#changelog.fix Version}}{{toString}}{{/changelog.fix Version}}
Jira Service Management の顧客満足度
レート
Jira Service Management のレート カスタム フィールドの値を返します。
{{issue.Satisfaction.rate}}
規模
Jira Service Management のスケール カスタム フィールドの値を返します。
{{issue.Satisfaction.scale}}
ルール
{{rule.name}} - Prints out the name of the running rule
{{rule.actor}} - Accesses the rule actor user.
sprint
追加方法: スプリント作成、開始、完了の各トリガー
{{sprint.id}}
{{sprint.name}}
{{sprint.isStarted}}
{{sprint.isClosed}}
{{sprint.startDate}}
{{sprint.endDate}}
{{sprint.completeDate}}
{{sprint.originBoardId}}
{{sprint.goal}}
VERSION (バージョン)
Jira でのリリース/バージョンを表します。
{{version.name}}
{{version.id}}
{{version.description}}
{{version.archived}}
{{version.startDate}}
{{version.released}}
{{version.releaseDate}}
{{version.project.key}}
{{issue.versions.first.name}}
webhookData
追加者: Webhook トリガー
これによって、受信 Webhook と一緒に送信されたデータにアクセスできます。
Webhook リクエストの本文
{{webhookData.someValue.childValue}}
webhookResponse
追加者: Web リクエストを送信 (応答待ちが有効)
リクエストが成功すると、次のスマート値によって Webhook レスポンス データにアクセスできます。
{{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}}
次のフィールドによって複数の応答にアクセスできます。
{{webhookResponses.last.someValue.childValue}}
{{#webhookResponses}}
Data from response: {{someValue.childValue}}
{{/}}
作業ログ
追加者: 作業ログ トリガー
課題に対してログに記録されたばかりの作業ログ エントリ。
{{worklog.comment}}
{{worklog.started}}
{{worklog.timeSpentSeconds}}
// Cloud only
{{worklog.timeSpent}}
// Visibility is available when the worklog is restricted
{{worklog.visibility}}
{{worklog.visibility.type}}
{{worklog.visibility.value}}
アセット フィールド
現在、アセット オブジェクト内にあるフィールドへのアクセスはサポート対象外です。コードでは、スマート値は今でも以前の名前である InsightField を参照しています。
アセット フィールドのフル ネーム、キー、または要約には次のスマート値によってアクセスできます。
{{issue.InsightField}} // returns Some Client Name (ABC-123)
{{issue.InsightField.key}} // returns ABC-123
{{issue.InsightField.summary}} // returns Some Client Name
Tempo Account フィールド
Tempo アカウント フィールドのプロパティには、次のスマート値によってアクセスできます。フィールドが正しく機能するように、TempoAccountField
を次のデータのいずれかに置き換えてください。
- 実際の Tempo フィールド名 (既定では [アカウント]) を使用します。
customfield_XXXX
を使用します。ここで、XXXX
は Tempo カスタム フィールドの ID です。
{{issue.TempoAccountField}} // Provides the name of the account
{{issue.TempoAccountField.id}} // Provides the ID of the account
{{issue.TempoAccountField.name}} // Provides the name of the account
{{issue.TempoAccountField.key}} // Provides the key of the account