Jira Automation: how to copy Assets-objects from one custom field to another?

Chris Schneider
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 21, 2023

Dear community,

I was asked by our management to implement the Service Level Timer on our Incidents.

In Assets, we have two object types: ICT Services and Business Services.

  • ICT Services is our IT-internal list of things we do.
  • Business Services are the things, that we provide to our customers. This is, where the Service Level Agreement (SLA) is defined.

On every ICT Service, there is an attribute, where I can add the relevant Business Services.

Assets_ICT_Services.png

 

Assets_BusinessServices.png

 

When a new ticket is created, our first level support adds the relevant ICT Services to the ticket. For the SLA-Timer, I need referenced Business Services, so that I can filter on them and start the SLA-Timer according to the SLA (Gold, Silver, Bronze).

Jira_IssueView.png

 

I tried to create an automation, which looks for the referenced Business Services and adds them to the custom field Business Services. I found an automation, which finds the referenced object-IDs, but I am not able to add them to the custom field. How do I do that?

Any help is very much appreciated.

Chris

2 answers

1 accepted

2 votes
Answer accepted
Chris Schneider
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 24, 2023

With the great help from @Simran G I was able to come up with a working automation.

 

  1. the automation is triggered, when someone edits the filed ICT Service on an issue.
  2. Second step is, to search for all Business Services that have an ICT Service as inbound Reference. (ICT Service is there on the issue.)
    Automation1.png
  3. Add the Business Services to the issue. Automation2.png

I do not yet understand, why I have to add the objects with the AQL. Why can I not simple use {{lookupObjects}}, as this provides the object-keys as well?

Chris Schneider
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 25, 2023

Update: the above automation throws errors, if no Business Service is found. Then, the Edit Issue Fields fails.

I solved it by adding an if-condition in the beginning. (Same AQL as with the lookup objects.)

Automation_IF.png

2 votes
Chris Schneider
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 21, 2023

Here a screenshot of my automation:

Jira_Automation.png

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