自動化スマート値 - アセット

このページのスマート値は、Jira Service Management のアセットでのみ使用されます。Jira Service Management のアセットについての詳細をご確認ください。

オブジェクト属性

自動化ルールをトリガーするオブジェクトの属性へのアクセスに使用されます。

構文

{{object.(attribute name)}}

attribute name は属性の名前を示します。

例

Let's say you have a HR object schema with an Assets object type called Employee, used to represent employees at your company. Let's also say you want to send a welcome email to all new employees when they join the company. You could create an automation rule that is triggered whenever a new Employee is created, and with the Send email action, create an email for that person.

この場合、次の入力:

Hi {{object.Name}}, Welcome to your first week! We're really excited to have you as our newest {{object.Job title}. Cheers, The Team

 

は以下を返します。

Hi Jessie, Welcome to your first week! We're really excited to have you as our newest Frontend developer. Cheers, The Team

Attribute changelog

Used for accessing the original and new values of an object attribute when it changes.

構文

{{attributeChangelog.(attribute name).from}} {{attributeChangelog.(attribute name).to}} {{object.attributeChange.(attribute name).changeType}} {{containerObject.(attribute name)}}

ここで:

  • attribute name is the name of the attribute on the object

  • .from returns what the attribute value changed from

  • .to returns what the attribute value changed to

  • .changeTypereturns the type of change in the attribute value: added/updated/deleted

  • containerObject return any attribute of the object triggering the rule

例

Let’s say you have an Employee object type with an Employee Status attribute. You want to run a rule only when the status changes from Onboarding to Active.

You can use conditional logic to run automation when this condition is met:

  • First {{Smart Value}} Condition:

    • First Value {{attributeChangelog.Employee Status.from}}

    • Condition: equals

    • Second value: Onboarding

  • Second {{Smart Value}} Condition:

    • First Value {{attributeChangelog.Employee Status.to}}

    • Condition: equals

    • Second value: Active

この例では:

  • {{attributeChangelog.Employee Status.from}} returns Onboarding

  • {{attributeChangelog.Employee Status.to}} returns Active

The rule only runs when both conditions are true – that is, when the status changes specifically from Onboarding → Active.

オブジェクト参照

オブジェクトの参照属性にアクセスするために使用されます。

構文

{{object.(reference name).(attribute name)}}

ここで:

  • reference name は参照を含む属性を示します

  • attribute name は参照されるオブジェクトの属性を示します

例

たとえば、社内の従業員を表すために使用される Employee と呼ばれるアセット オブジェクト タイプを持つ、HR オブジェクト スキーマがあるとします。また、各 Employee オブジェクトには Manager 参照があるとします。

[メールを送信] などのアクションで以下を入力します。

Hi {{object.Name}}, Welcome to your first week! Your primary contact for your first day will be {{object.Manager.Name}}. Please contact them if you have any questions. Cheers, The Team

 

は以下を返します。

Hi James, Welcome to your first week! Your primary contact for your first day will be Jessie. Please contact them if you have any questions. Cheers, The Team

オブジェクトのルックアップ

[Lookup objects (オブジェクトのルックアップ)] アクションによって返されるオブジェクトのリストへアクセスする際に使用されます。

構文

{{lookupObjects}} {{lookupObjects.(attribute name)}} {{lookupObjects.(reference name).(attribute name)}}

ここで:

  • attribute name は参照されるオブジェクトの属性を示します

  • reference name は参照を含む属性を示します

これは「自動化スマート値 - リスト」にあるスマート値とも組み合わせられます。 

例

たとえば、社内の従業員を表すために使用される Employee と呼ばれるアセット オブジェクト タイプを持つ、HR オブジェクト スキーマがあるとします。また、前の週に入社したすべての新入社員にウェルカム メールを送信するとします。この場合、[オブジェクトを検索] アクションを使用して先週作成されたすべての Employee オブジェクトのリストを取得し、[メールを送信] アクションを使用してすべての新入社員リストを送信できます。

次の入力:

Hey team, We have {{lookupObjects.size}} new people joining the team today. Please welcome: {{#lookupObjects}} * {{Name}} {{/}}

は、以下を返します:

Hey team, We have 3 new people joining the team today. Please welcome: • Omar Darboe • Fran Perez • Jie Yan Song

この例では、.size は属性名ではなくリストのスマート値であることに注意してください。リストのスマート値の使い方に関する詳細をご確認ください。リストのスマート値の使い方に関する詳細をご確認ください。

さらにヘルプが必要ですか?

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