Hey there (newbie incomming :)),
I'm trying to setup an Insight automation rule (for testing purposes), which is supposed to run every time a specific attribute is updated by a specific user but I'm struggeling getting my head around the Insights Query Language especially using placeholders (even after reading through the docs).
I'm having an objecttype, which is called component, which contains a mac-address.
I also have a SCCM Integration which is supposed to overwrite the mac-addresses of every component overnight using a "System User" to update the mac-address components, which makes the change-performer visible in the history (/activity) of the object (This works works as espected).
So now the idea is to run an automation, which gets triggered by an object-update and creates an issue IF the Objectype="component" AND (here my IQL capabilities come to an end) the changed attribute of the objecttype is called "mac-address" AND the user who submitted the change is called "System User".
--> following this idea, I should be able to filter the change, which happened on the component, out of the object history (/activity) events (pseudo-code):
component.activity.type = "changed value" AND component.activity.attribute = "mac-address" AND component.activity.performer="System User"
Do you have any ideas on how I can pull this information out of the database?
Thanks in advance
Unfortunately I don't believe there is a way to make IQL search the history. The only way I can think of accomplishing what you want is to create an automation that triggers on object update when the objectType check for your object type matches then having an action of Groovy script.
The script would have to do the rest of the testing by retrieving and analyzing the ObjectHistoryBean objects associated with your object to see if the right value was changed by the right user per your example. The Insight JavaDoc has the reference documentation for the Java APIs that Insight provides. They have a number of Groovy examples in their documentation, though I haven't seen one that references the object history nor have I specifically written anything that uses the object history.
This one will likely take a fair bit of Insight scripting to pull off.
Hello Community! Quick disclaimer: We are running a contest on Community (The Atlympics!) from July 23rd - August 8th of 2021. If you are interested in participating in this contest (prizes! ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events