Forums

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

Check Current Assets for Auto Create and Updating Objects

Chris Mattingly May 2, 2024

My goal is to have an automation that will run in a JSM project when a ticket is made that will look at current objects in Assets and either create an object if a field is not found or update an already existing object if the field is found.

I currently have an automation rule that:

  • Creates an object with the following fields
  • Assigns the object to someone
  • Ties a serial number to the object
  • Ties a branch to the object

Right now, that automation is very simple and just makes an object. What I'd like it to do is include a check against current objects by looking at the serial number field and if that serial number exists I want it to edit an object instead of creating an object. Finally, if the serial number does not exist, then it just creates the object.

Current create item.png

This is my current create object automation, which is running on issue creation. I want to add the Lookup objects action and look at all current object's Serial Number's and if it matches, I update the object with the matching serial number otherwise i create a new object.

 

2 answers

0 votes
Chris Mattingly May 2, 2024

Implementation.png

Here you can see kind of where I'm trying to go.

On issue creation, I want to look at all objects in the Schema A S Equipment and I put Serial Number = {{issue.description}} 

The ticket that is created in this project contains the Serial Number in the issue description area (not sure if this is how to achieve this)

I then added an if/else condition:

If condition.png

If the description field of the issue contains a serial number found in the Schema then it will update the Branch and User Assigned fields of that given object in a Then:Edit object attributes action.

Else it will create the object. Is this correct? I'm having issues when trying to run this currently.

0 votes
Chris Mattingly May 2, 2024

When the issue is created, the issue's description contains the serial number.

Suggest an answer

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

Atlassian Community Events