Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Set Insight custom field with referenced object

Nigel Verlé October 25, 2021

Hi, 

 

We're trying to fill in in an Insight custom field, based on an outbound reference of an object selected in another Insight custom field. 

 

We have two object types ABC & XYZ. In object type XYZ, there is a reference to an object within ABC. We've created a two custom fields for ABC & XYZ as well. If we select an object in XYZ, we want the referenced object to be added to the ABC field. 

  • Both CF's are multiple value fields
  • Objects should be added to the CF, not overwritten

I've tried to set this up with automation for Jira but without success.

 

Any help is greatly appreciated. 

2 answers

1 vote
Björn Gullander
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.
November 2, 2021

Hi, 

There is a very useful way in Insight DC to automatically update a custom field depending on other field values in the issue. Using the Filter Assign Scope (with checked "Assign strict") you will update your field on any update of the issue. 

For example, if we have a field Affected Service that the user sets and we want to set the Service Category field automatically depending of the service. Assuming also that we have an object reference from Service to Category in Insight objects. 

Then you could configure your Service Category field like this:

Filter Assign Scope (IQL): object HAVING inboundReferences(objectType = "Business Services" AND Key = ${Affected Service})
Make Filter Assign Strict = True

 This will update - not add the values in the field but maybe you can use this anyhow.

Björn

Nigel Verlé November 8, 2021

Hi Björn,

 

Thank you for the answer, I already looked into this option, but this didn't work out the way we needed it to. 

Thanks anyway! 

0 votes
Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 25, 2021

I don't think this is possible with Automation out of the box.

You need access to Insight-automation or some groovy engine (like scriptrunner or insight groovy automation).

Since Insight doesn't have a way to process edit events (like automation or scriptrunners do), you would need to somehow force this sort of edit to be done via a dedicated workflow screen (i.e. don't show the XYZ field on the create or edit screen, only on a special screen called by a special workflow transition [from any status to itself]).

Then you will have access to the insight post functions - one of them being a groovy script option.

Nigel Verlé October 27, 2021

Thanks! Was thinking about this as well, but wanted to see if an option without a transition (screen) exists. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events