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
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!
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.