Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Which automation should be used to automate selection of an object from Asset Management

Jason Li Ting Chung December 28, 2022

Hi Team,

I make an automation to select an object from asset management and put it in the custom field of asset management.

Since the field return a list of object, the automation is not working.

Please advise

2 answers

0 votes
Vilim Berger January 3, 2023

Hi @Jason Li Ting Chung

it depends on the automatic that you arranged, considering that it returns a list of objects, I assume that you have not configured a placeholder on the basis of which that field is filled.

there are several ways to populate the field when creating a task or when transitioning a task.

Method one:
Insight/Asset automation rule.
Create an Insight automation rule that will create a task when IQL is matched and select the Insight custom field that will be filled during the task creation. Make sure that the configuration of that field is aimed at the same object type where the object is located from where the automation rule is triggered.

The field will be filled with the object that triggered the automation rule.

The second way:
For example. If you have an object type with "User" objects created with "Jira user" import and you add an attribute "Jira user" that will be filled with reference to the Jira user, you could match the User object using the "Reporter" field.

Custom field configuration
Object schema: select your schema where the object type is located
Filter Scope (IQL): objectType = "Users"
Filter Assign Scope (IQL): "Jira user" = ${reporter}

Beware that for this one you have to use a placeholder from the Jira task: ${reporter}

The field will be filled with the user object that matches the reporter.

Another way is to use the Insight post function
For this one you don't need to add a "Filter Assign Scope" configuration to the custom field, you just need to add a "Filter Scope" that aims to the wanted object type.

Then on the "Workflow" add an Insight post function "Assign Objects from an IQL query based on data from an issue." on the "Create" transition. Make sure that you change the position of the Insight post function after step "1. Created the issue originally."
If we are using the same "User" custom field then in the configuration of that post function add this configuration:
IQL: objectType = "Users" AND "Jira user" = ${reporter}
Target custom field: Select "User" custom field

End result will be that the field will be filled with the user object that matches the reporter.

I hope this will be helpful. :)

0 votes
Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 28, 2022

@Jason Li Ting Chung -

Please take a look at the following documentations for smart values regarding to Asset mgmt objects and how to handle a list of objects:

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-insight/

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-lists/

Hope this helps.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Infrastructure Applications Team

Viasat Inc.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events