Forums

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

Using post-function to set Insight custom field value

Henno Gous
Contributor
March 29, 2018

My scenario is roughly like this:

  • I have two objects (of different types): Object A and Object B.
  • Object A has a reference to Object B
  • Object B has a user attribute

What I want to achieve, is:

  • When an issue is created where Object A is selected in JSD, I want to load the user in the user attribute in Object B into the Approvers field of the issue.

To achieve this, my current approach is to have an Insight post-function in the workflow ("Set a Jira custom field with the attribute value from a selected object") that uses

  • the field with Object A selected as source,
  • the object reference attribute between Objects A and B as the attribute value to load, and
  • a new Insight custom field configured to accept objects of type B as the target.

Once this works, I plan to use another similar post-function to load Object B's user attribute into the Approvers field on the issue... but I can't get the first post-function to "jump" between the two objects to work.

Is this kind of functionality supported?

In the documentation for the target field, I saw that "reference fields can't be selected"... but I suspect this relates to Insight reference-style custom fields and not references between objects in standard Insight custom fields. All the fields I want to use show up in the drop-downs showing eligible fields.

 

1 answer

1 vote
Alexander Sundström
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.
April 6, 2018

Hi Henno,

As we have continued this discussion internally with you in our service desk, I will answer it here as well so others can benefit from the information, feel free to mark this question as answered.

As of 5.4 we have introduced a new custom field and some new functionality, like the Filter Assign Scope (IQL). Using this you can assign objects to an Insight custom field based on information from any fields on the issue. Using that, it should be possible to assign object B based on the reference from Object A.

This functionality is available on both the old deprecated and the new Insight custom field.

Take a look at the documentation for the custom fields at:

https://documentation.riada.se/insight/latest/insight-administrator-s-guide/insight-custom-fields/insight-custom-field-deprecated

https://documentation.riada.se/insight/latest/insight-administrator-s-guide/insight-custom-fields/default-insight-custom-field 

Cheers!
Alexander

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events