Hi!
Here is an example of changing and storing an attribute bean of an insight object: [Example Groovy script to update Object Type attribute value|https://confluence.atlassian.com/jirakb/example-groovy-script-to-update-object-type-attribute-value-1077910497.html]. I extended that example to store three attribute values. I use it in an automation script. Let's name it 'A' and it is triggered on a Move event.
try{
objectBeansToStore.each{objAttBean ->
objectTypeAttributeBean = objectFacade.storeObjectAttributeBean(objAttBean);
}
objectBeansToDelete.each{
objectAttributeBean = objectFacade.deleteObjectAttributeBean(objAttBean.id);
}
} catch (Exception e){
log.error("Could not update object attribute due to validation exception:" + e.getMessage());
}The problem is that each store triggers an Insight update object event, three in total. That is a problem since I have automations that are triggered on an Object updated event. And when I move hundreds of objects, the other automations multiply by three.
Is there a way to store any number of attributes and their new values to produce only one update event? I looked through the API to see if there is a function that takes a list of Object attributes to update but cannot find any. I'm sorry if I didn't look hard enough and missed something.
I have Jira 8.13.18 and Insight plugin v 8.9.4.
Thanks for the help!
Cheers,
Marina