Forums

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

How to pull Asset attribute data for a specific Asset in automation

Alex Smyers August 14, 2024

I am running into trouble trying to reference specific asset attributes in automatons in JSM Cloud.

We are using assets to track systems we have and the different access types associated with them. Example, we have Adobe Software which we have identified as a "Service". Adobe Software then has three Access Types, Adobe Acrobat Pro DC, Adobe Captivate, and Adobe Creative Cloud Suite.

We have system access forms created on our request portal for new and existing employees. These forms allow users to select multiple Services. For example an employee could need access to Adobe Software - Adobe Captivate (Service is Adobe Software and Access Type is Adobe Captivate) and Github - Github (Service is Github and Access Type is Github). We are using an automation to create sub-tasks for each Service needing access. My goal is to have the Access Type needed in the description of each sub-task.

I can populate both Service's Access Types easily with {{object.attribute name}} in our case, {{Access Type.Access Type Name}}, however I cannot figure out how to create a condition around this to give me the name of the access type for one system. I do have each service split out to have their own sub-task created with an If: matches JQL condition "Service" = "Service Name" ex "Service" = "Adobe Software" which is working fine.

I've tried all sorts of combinations smart values such as {{Service.Adobe Software.Access Type Name}}, {{Adobe Software. Access Type Name}}, conditional logic with smart values, as well as using the Lookup options action.

Is what I am attempting to try possible? If so, what would be the be the best method to accomplish this.

2 answers

0 votes
Tessa Tuteleers
Community Champion
August 14, 2024

Hi @Alex Smyers , 

Welcome to the community! Fun question! 

If I understand correct, you want to: 

- Loop over Service (multiple values possible)

- Then get al values from Access Type field associated with that service? 

 

To create your automation, you will need to do the following: 

  • Loop over your services with a smart value branch -> very easy: {{issue.Service field}} and name the smart value service -> now you will be able to branch over the different services in the Service field
    • in that branch (loop), do an AQL lookup to find the matching objects -> 
      key in ({{issue.Access type}}) AND "Service" = {{service}} 
      This will return all objects in the Access type field, and then limit them to the service in thet specific iteration of the branch
    • Then create a subtasks with whatever info you want to get out of the {{lookup objects}}
      • To iterate over the returned objects, use an inline list in the description field
        {{#lookupObjects}}
        * {{Name}}
        {{/}}

 

It should look something like this: 

Screenshot 2024-08-14 210044.pngScreenshot 2024-08-14 210123.pngScreenshot 2024-08-14 210128.png

 

Let me know if you get it working! 

- Tessa

0 votes
Maruthi Veluru
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 14, 2024

If my understanding is right , once you have lookup objects, create variables to capture specific asset fields 

then you can use them for validations example I have used peak start and end dates coming from assets object

IMG_6829.png

then you can smart values condition 


IMG_7051.png

Suggest an answer

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

Atlassian Community Events