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

defining Assets in custom field by Service

Michael Wheatstone April 24, 2023

I am currently trying to make it so that when I select a Specific service using the "Affected services" custom field generated by JSM, I am able to only see objects that have that service listed as an attribute on Assets.

I have made sure to add and object attribute that points to the list of service in my service schema named "Service", so that there is an out bound reference to the service, and on the service there is an inbound reference to the object.

However I am unable to figure out the correct AQL to make the field on my JSM issues only show the objects based on the service selected in the Affected services field.

Filter scope is set to: objectType = Asset

Filter issue scope is set to: "Affected services" = ${Service}

I suspect my AQL is wrong or I am missing a step but I have been unable to find any cases where someone has done this before and documented the results.

1 answer

1 accepted

1 vote
Answer accepted
Jeroen Poismans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 24, 2023

Hi there,

That should indeed be possible. I have a similar setup that works as follows: Every Device has a Device Type. The Device is linked to the Device Type via an attribute called Type.

Selecting a Device Type then filters the Device field. Here is how the Device CF was set up:

Screenshot 2023-04-24 at 11.14.28.png

So instead of using the name of the CF I prefer using the ID, which might make a difference here.

Actually also change the Filter issues scope to this:

Type IN (${customfield_10082})

Since more than 1 service could be selected, this way you're always safe!

 

Hope this helps!

Jeroen

Michael Wheatstone April 24, 2023

Hi unfortunately this is not working for me, here is what i tired based on your advice.

shot 1.PNG 


Michael Wheatstone April 24, 2023

Also tried

shot 2.PNG

Jeroen Poismans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 24, 2023

Ok,

Now a screenshot (or multiple) of your Object schema and attributes of your 2 involved object types would surely help to debug further.

 

Regards,

Jeroen

Michael Wheatstone April 24, 2023

Hi Jeroen, that's fine as it's a test schema in preparation for migrating our old server based Asset database to cloud, I need to figure this out so we can complete our Server to cloud migration of JSM. unfortunately as you may be aware Assets on server does not transfer over and the custom fields available have gone from 2 (object and referenced object) to one "asset objects"

There is the schema for the services which can only contain services (i have made this visible to other databases so it's objects can be referenced)
shot 5.PNG

Here is the dummy schema and the attributes I setup to test this process because as stated before I need it to work before I can migrate
shot 3.PNGshot 4.PNG

Jeroen Poismans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 24, 2023

Ok,

So I haven't tested had a cross-schema reference on Cloud before, so I am going to try this out myself :-). 

To be complete: the asset custom field is the one you already shared the config of? The Service custom field is the one with ID 10078?

 

Jeroen

Michael Wheatstone April 24, 2023

Hi Jeroen,

Yes the customer field known as "Affected services" has the id 10078, this was created by JSM but is listed as a locked customer field with a custom field id

Jeroen Poismans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 24, 2023

Ow I see!!

So the Service attribute on the Asset is does not point to the same type as the Affected Services? That explains why the AQL does not work.

In order for this to work you would have to create a new Assets custom field pointing to your Services object type. The reference that field in the Asset custom field.

 

Jeroen

Michael Wheatstone April 24, 2023

Hi Jeroen,

That's incorrect, the "Affected services" field points to the objects in the Service schema (it's the only thing the field can see, and only service objects can be placed in that schema), and the attribute "Service" in the Service Assets schema also points to the objects in the Service schema.

They both point to the same list of objects

The field I'm trying to create should following al the reading read that the "Affected services" field on the issue is set to "Jira" (example service) and therefore provide a list of the objects that have "Jira" set as their Service in the attribute called "Service"

The documentation makes this appear possible, but I am failing to workout how

Jeroen Poismans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 24, 2023

Ok,

Got the full picture now to try and test it, keep you posted! Interesting case!

 

Jeroen

Like Michael Wheatstone likes this
Jeroen Poismans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 24, 2023

Hi @Michael Wheatstone ,

I tried myself and was not able to get this to work. Further research explanes why, it is a feature request:

https://jira.atlassian.com/browse/JSDCLOUD-10340

In a nutsell:

Affected Services though it looks like an Insight Object custom field, and has an Insight schema backing it up, is in fact using Opsgenie API and Opsgenie's service id's for the items. 

Does not solve the problem, but at least gives you an answer it's not possible at this point.

 

Jeroen

Michael Wheatstone April 24, 2023

Hi Jeroen,

Thank you for taking a look, this is very disappointing, i'll get a vote on that feature and hope they resolve it one day.

Looks like I have to plan around it, and develop a solution that doesn't include the provided field for now

Jeroen Poismans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 24, 2023

There is some workaround you could try and I'm just spitballing here, haven't tried it. In the Automation rules section of Jira Cloud you can trigger on Assets create / updated / deleted ... and the Services Objectschema is also selectable there.

You could create an ObjectType in your Assets schema containing the Services, then link from the asset to that ObjectType (this way the earlier described syntax would work). Then to keep the Services up-to-date you could create an automation rule:

  • Trigger object created / updated / deleted of the Opsgenie Services (in the built-in object schema
  • Condition filtering on Objecttype
  • Action: Do the appropriate action on your custom Services objects

Screenshot 2023-04-24 at 13.48.20.png

 

Not sure if you'll get there entirely, but is your best shot at this point.

 

Jeroen

Suggest an answer

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

Atlassian Community Events