Forums

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

How can I use automation to see if an object already exists in an object schema in JSM Assets?

Tobias Koch August 14, 2023

Hello Atlassian Community,

I have the following case in Jira Service Management Assets: I want to check if an Object already exists in an Object Schema. When a JSM ticket is created, we create an Object in the Object Schema "Customer Companies". "e still need the condition to check if an Object with the same name already exists in the schema. If yes, no additional object is to be created. How can I add this to the automation? I have added a screenshot of the automation.

Bildschirmfoto 2023-08-14 um 12.18.40.png

Many thanks

2 answers

1 accepted

1 vote
Answer accepted
Rudy Holtkamp
Community Champion
August 14, 2023

Hi @Tobias Koch ,

Use the 'lookup objects' component, with 

objecttype = "yourObjectType" and label = "{{issue.fields.customfield_10965}}"

Then use and 'advanced compare condition' component with

{{lookupObjects.size}} equals 0

Then the 'create object' component

 

Now it will only create an object if it does not exists.

0 votes
Tobias Koch August 16, 2023

That worked, thank you!

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