Link JSM Asset to user what opened issue
Asked by Jacek:

Good Day

I am struggling with how to link the assets from JSM assets to issue they are created.

I only need to see the asset data i like in the ticket.

ANyone have an idea how to create the automation for this?

I already have an custom field created and see the field in the issue but i need to show the assets for the user he has created the issue

What i think for sure, that i will have to change Filter Scope in the custom field when i will use if for windows and macos. Can the filter scoped be configured for Laptops/Windows and MacOS in one filter scope

I tried objectType="Laptops"."MacOS" but this isnt working

![SCR-20240614-mklt.png](/t5/image/serverpage/image-id/329905i65AB5E014F6AD32E/image-size/large?v=v2&px=999 "SCR-20240614-mklt.png")![SCR-20240614-mkjg.png](/t5/image/serverpage/image-id/329906i13CEDE789EB0C333/image-size/large?v=v2&px=999 "SCR-20240614-mkjg.png")

thank you in advance


Answers:
author: Mark Higgins
body: Hi Jacek,

Just want to paraphrase your challenge first.

So, you have the customfield on the Edit/View screen for the ticket, and hence, if you go to that asset, in Assets, does it show the ticket that it belongs to?

The filter scope is set up, so that it will display the asset linked to the reporter in Assets.

In the Laptops Assets attribute, is there a link to the User?

Cheers

Mark

comments: author: Jacek
body: Hi Mark  
thank you for answering.

*So, you have the customfield on the Edit/View screen for the ticket, and hence, if you go to that asset, in Assets, does it show the ticket that it belongs to? yes and no.*

I tried yesterday ti change the **Filter scope (AQL):** objectType="MacOS". Then i was able to connect my created test ticket to my macbook. This means that i have to change the **Filter scope (AQL):** objectType="MacOS" to something else, that i can retrieve windows and macos in our tickets. Not found a way how i can combine this in one query until now.

Windows devices wont be found this was with ths **Filter scope (AQL):** objectType="MacOS"

The filter scope is set up, so that it will display the asset linked to the reporter in Assets.

For the moment i changed it to macos to find out if the filter scope is wrong. so macos is working fine with **Filter scope (AQL):** objectType="MacOS"

Logically windows is not working with **Filter scope (AQL):** objectType="MacOS"

Using **Filter scope (AQL):** objectType="Laptops" isnt working for both windows and macos. Need to find a way to combine it in the query..

In my test ticket when i link the asset manually in the issue field, its found and shown and checking via

*In the Laptops Assets attribute, is there a link to the User?*

Yes but now only for the macbooks

The first screenshot doesnt show an asset, because i was searching windows device

![SCR-20240615-igss.png](https://community.atlassian.com/t5/image/serverpage/image-id/330023i09AEE138C9DF073A/image-size/large?v=v2&px=999 "SCR-20240615-igss.png")![SCR-20240615-ilce.png](https://community.atlassian.com/t5/image/serverpage/image-id/330024i9D661465F4C3F151/image-size/large?v=v2&px=999 "SCR-20240615-ilce.png")![SCR-20240615-ikxr.png](https://community.atlassian.com/t5/image/serverpage/image-id/330025i020862758D8C02A3/image-size/large?v=v2&px=999 "SCR-20240615-ikxr.png")


author: Jacek
body: First issue solved :)

Changed the query to

**Filter scope (AQL):** objectType="MacOS" and objectType="Windows"

So now i need to find a way, how to add the user asset automatically to his created issue with an automation


author: Jacek
body: Oh nooo! was wrong, filter query for both looks ok in the custom field configuration, but isnt working at all when combined

**Filter scope (AQL):** objectType="MacOS" and objectType="Windows"

or

**Filter scope (AQL):** objectType="MacOS" AND objectType="Windows"

The same for:

objectType="Laptops.MacOS" AND objectType="Laptops.Windows"

I am a total beginner with aql so excuse for the misstakes i do :)  
I was searching for help here

[Advanced searching: AQL - Assets Query Language \| Jira Service Management Data Center 5.16 \| Atlassian Documentation](https://confluence.atlassian.com/servicemanagementserver/advanced-searching-aql-assets-query-language-1044784588.html)

and here

[How to use Assets Query Language (AQL) \| Jira Service Management Cloud \| Atlassian Support](https://support.atlassian.com/jira-service-management-cloud/docs/how-to-use-assets-query-language-aql/)


author: Jacek
body: Found the filter scope solution

**Filter scope (AQL):** objectType="MacOS" OR objectType="Windows"

now i only have to find a way for the automation


author: Mark Higgins
body: Cool Jacek.

Have you considered having a generic schema for laptops and then an attribute to determine the OS?

If the field is linked into the screen, then the asset should now link, without any automation.

M


author: Jacek
body: Hi Mark

i thought a lot of different solutions about the generic schema. Also in combination with the imports (csv) to have it easiest possible.

I actually use the asset tag for the OS but am not using it for something specific. I thought while importing and creating the import structure, that maybe i will using it in the future.

The asset is not linking automatically. Was trying yesterday the half day and was searching in the atlassian guide. Not clue how configure the automation.

You think the assets should be linked automatically to the screen?

From my side its not working like this.

Creating an support case dont link automatically an asset from our assets


Tags: cloud

jira-service-management

jira-service-management-cloud