Forums

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

Update only one attribute with insight post function

Stefan Bogdan Cimpeanu
Contributor
May 14, 2018

Hello,

In our Insight setup we have objects that have Owner and Custodian as attributes, which both reference the same object type, which is basically an active directory.

For servicedesk integration, we created a custom field named Owner that sources the active directory objects from insight, and another which sources some of our IT assets with the Owner and Custodian attribute.

We added a post function on one of our transition that would update the it assets custom field with the value of the Owner custom field.

The issue is that both Owner and custodian get the new value.

Any hints on how to limit to only the Owner attribute please?

Using groovy is a bit worrying when this needs to scale to other object types that use a similar set of attributes.

 

Thanks,

Stefan

1 answer

0 votes
Ola_Melin
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.
May 17, 2018

Hi, 

I am not entirely sure if I understand the use case so please correct me if I misunderstood. 

You want a custom field to be updated with an object from Insight based on the value of another custom field? 

Is it something similar to this request that you want to achieve? https://jira.riada.se/browse/ICS-797

If so the post function "Assign Objects from an IQL query based on data from an issue" might be what you are looking for. 

 

Cheers

Stefan Bogdan Cimpeanu
Contributor
May 17, 2018

The use case is that I want to update only one attribute of the same type from an object, with the value from a jira custom field.

 

Imagine an object called "PC" that has "Owner" and "Custodian" as attributes, both being "user" type attributes. The jira custom field would hold a username select.

Now imagine a jira transition named "assign pc", you'd only want to change the owner, not the custodian too.

If you use the "obvious" choice to update attribute based on another field, both Owner and Custodian get updated with same value.

 

The solution is to use "Set the value of an object attribute with a predefind value", where source field is the custom field holding the PC object, Insight Object Type Attribute Name woudl be Owner for my case, Change Value would be ${customfield_xxx} which is the jira custom filed that holds the user I want to assign the pc to.

 

Thanks,

Stefan

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events