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

Id of Insight object in automation

Jiri Kofron October 5, 2021

Hello,

I have a problem with the Insight automation rules.

I have dozens of Insight object below Object schema.

I'd like to change the custom field value of Imbound Reference of the Insight object, when the object itself is modified.

I'd like to create the automation rule in Object schema: WHEN trigger "object modified" is fired, I would execute the groovy script. But I can't figure out, how I can get the current Insight object to the groovy script, as the user can modify any of the objects and I need that groovy script execute only on the one object and on the Imbound References, that user modified.

I wasn't able to get far with the code, as the get the information about which object was modified is the first step. So I can't share any code.

I'm really lost in this

Thank you!

Jiri

1 answer

0 votes
Alexander Lackner October 20, 2021

Hey Jiri, 

just saw this question as well. This is actually pretty easy.

Once the automation runs and triggers the Groovy script, variables are passed to the script which includes the object that was modified. From this object parameter you can get the ID and also the inbound references via an IQL Query. 

Sadly a lot of the links to the old insight documentation no longer work, this new one describes which variables are available to use in a groovy script: https://confluence.atlassian.com/servicemanagementserver/configuring-automation-rules-1044784502.html

Look under 3. Add actions (THEN) / Available actions / Execute Groovy script

Hope this helps!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events