Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automatically update an Insight custom field when new objects are created

Weronika Witkowska Adm February 2, 2021

Hello,

I've been trying to find a solution for my problem, unfortunately without much success. Maybe someone here can help me a bit.

So, I have two object types in Insight. One object from object type 1 is selected by the user when creating an issue. Objects from object type 2 have a outbound reference to objects from 1. Now I managed for all objects from 2, that have an outR to the object from 1 which was chosen by the user, to be visible on the issue (so a multiple objects custom field).

The problem is when a new object from 2 is created in Insight. When this happens, I need it to be displayed on all existing issues without needing to trigger for example a transition to update the custom field.

Does anyone have any ideas? I'm grateful for any thoughts on this.

1 answer

1 accepted

0 votes
Answer accepted
David Sumlin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 3, 2021

You could do this with Automation, but the script will continue to get slower over time. (as more issues and objects in the system are created)

You would have to write a script to find all the objects that the new object has an outbound reference to an object type 1 object, and then find all the issues where those object type 1 objects have been selected, and then add your new object to the multiple object type 2 field.

Weronika Witkowska Adm February 9, 2021

Hi, thank you for your answer! I managed to implement it as an Automation rule that gets triggered when an object from type 2 has been created (just as you suggested). The rule runs a script, that runs a JQL query which returns all the Issues where the associated object from type 1 has been selected. And then the custom field for object from 2 gets updated.

The performance will be monitored.

Thank you again!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events