It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Insight Automation rule - Creating Issue on update of specific object attribute through history Edited

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):

IF:

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

1 answer

1 accepted

0 votes
Answer accepted

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.

Hi Craig,

thanks for the answer. I already expected something like this, since I've seen a feature request for another but similar topic, yesterday, about analysing the actions in the history.

Thanks anyway :)

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

Do you miss a recurrence feature in Jira to handle your managed service contracts?

  If your company uses Jira and Tempo and deals with managed services, you probably feel the need to create or simulate contract recurrence to better track your services in a monthly basis, for...

73 views 0 0
Read article

Community Events

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

Events near you