Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Assets Automation

Nate Dickinson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 20, 2023

I'm evaluating JSM premium because of the use of the assets application. I need to do the following, and am wondering if I need to involve automation to complete the task. 

 

Given: 

 

In assets

I have an object with the following attributes: 

Name

component reference 

 

In JSM

Asset Custom field-Client information

Filter scope is my Assets Object type-"clients" 

 

In Automation: A client creates a JSM ticket and is assigned a component value given their existing customer information 

 

Ask/Pseudocode: 

I want JSM to automatically pull the object into JSM where component in jsm matches the attribute component reference in Assets. 

 

I can currently manually search for objects within JSM, but I'm not seeing the action for this in the custom field, or JSM. I'm assuming this has to be done in automation. Is that correct? 

 

 

 

 

 

 

 

 

 

 

 

 

1 answer

1 accepted

2 votes
Answer accepted
Mikael Sandberg
Community Champion
February 20, 2023

Correct, you have to do it using automation. Here is an example where the linked assets is populated with the reporter's assets when a request is created.

Screenshot 2023-02-20 at 11.07.31 AM.png

Nate Dickinson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 20, 2023

Thank you Michael, If I'm just querying via components does this make sense? 

 

"Name" = "{{components}}"

 

Name is the attribute in assets. 

Nate Dickinson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 20, 2023

This works but it's hardcoding the reference: 

 

"Name" = clientname 

 

None of these work though. Am I supposed to use a smart value? What documentation are you referencing for this? 

 

"Name" = "{{Components}}"

"Name" = "{{issue.Components}}"

"Name" = "{Components}"

"Name" = Components

 

I keep getting this error: 

No objects were returned from query.
No fields or field values to edit for issues (could be due to some field values not existing in a given project):
Mikael Sandberg
Community Champion
February 20, 2023

Use "Name" = {{issue.components.name}} instead, otherwise components would come back with the internal number instead of the display name. And to cover the situation where you have multiple components on the request you should use this one instead:

"Name" in ({{issue.components.name}})

Nate Dickinson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 20, 2023

Thank you Mikael this is right on. I just added a print statement when you sent the note about adding the .name to the query. I had no idea that components were organized numerically and understand why assets would've missed the reference by being sent a number value. This gets me off and running. Do you have any recommended documentation? 

Like Mikael Sandberg likes this
Mikael Sandberg
Community Champion
February 20, 2023

I reference Smart values in Jira automations a lot, and from time to time I end up in the automation template library.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events