Forums

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

Jira automation to update asset objects based on the current object attributes

Danny
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 19, 2025

Hi Community, 

I have a puzzler and I am going around in circles trying to create a jira automation rule. 

The scenario

I have a JSM project, there is a request type for customers to raise an incident when their equipment is broken and needs to be replaced. 

The customer will select the damaged equipment when submitting the request via a custom field field, Affected Assets. The objects referenced have an Owner attribute, and a Status attribute. 

The Owner attribute reference's a User object which is the customer. 

The Status attribute reference's the equipment's current operational status. 

Object 1 will have an Owner attribute value of the "customer object", and a Status attribute of "Allocated".


I hope you are with me so far :D 


Next, the agent will select another asset object (equipment), using the same custom field so now there are 2 objects referenced in the custom field. The new object will be the replacement equipment. The agent can see the object's Owner and Status attributes so they can make an informed choice that they are allocating an object with a Status of Unallocated and Owner is empty. 


This is where the automation rule comes in (I know what you are thinking, get on with it :D)


I need an automation rule that triggers when the request is transitioned to Closed. (easy so far)

The object that has an Owner, (and the Owner equals the issue reporter) needs to be cleared, and the Status set to Unallocated. 

The object (equipment replacement) that has no Owner needs to have the issue reporter as the Owner set, and the Status of the object updated to Allocated. 

Is this possible? 

Thanks,

Danny

 

1 answer

1 accepted

6 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 19, 2025

Hi @Danny 

Have you tried using AQL to branch to the object(s) and then using the Edit Object action to make the changes?

Kind regards,
Bill

Danny
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 20, 2025

Thanks @Bill Sheboy I had previously attempted to test with the AQL branch and had gone down a rabbit hole. You reply prompted me to stand back and walk through the end goal in my head until I could visualise a logical set of queries and actions the rule needed to go through. 

The steps that the rule takes now is thus: 

  1. Several issue Conditions - just to be sure as it is a global rule.
  2. An object lookup to get the issue reporter's object key within a different schema from where the assets are stored. I reference the issue report object key in the Owner attribute against the equipment object in equipment schema. 
  3. Create a variable to store the issue report object key as a smart value to reference later. 
  4. Now to AQL branch, using the connectedTickets function I can pass through the issue key where the equipment objects are referenced with some further AQL just to be sure the ticket I reference is the one in question. (The query identifies the damaged equipment object) 
  5. Edit the object attributes; Owner and Operational Status. 
  6. A 2nd AQL branch, using a similar AQL statement as above though with some slight tweaks. (The query identifies the the replacement equipment object).
  7. Edit the object attributes; Owner and Operational Status. 

All sorted and I'm happy. Also, I hope this helps anyone searching to achieve a similar goal. 

Thanks again @Bill Sheboy 

 

Like # people like this

Suggest an answer

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

Atlassian Community Events