Insight: How to create object with Attribute Types: Status & Project in Groovy

Tanya Tranter May 9, 2017

I execute a groovy script from JIRA Service desk and want to create an object in Insight based on information provided in Customer fields. I am able to get it to work for Default, User and Object attributes types, but are uanble to workout how to set the Status and Project attributes.

Looking for any groovy examples or information about the relationship of these attribute types

1 answer

0 votes
Tanya Tranter June 20, 2017

statusObjectAttributeValueBean.setIntegerValue(141);

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.
September 20, 2017

Hi, 

From Insight 5 we have provided an easier way to update attributes of different types with the ObjectAttributeBeanFactory. It will handle the creation of the object attribute bean with all values added to it correctly. It will not store the attribute so after creation you will have to add it to an object and store it. 

An example can be found here https://documentation.riada.se/display/ICV50/Update+object+attribute

 

 

Ola

Georges Moubarak
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.
January 11, 2018

Hi @Tanya Tranter, @Ola_Melin,

In my scenario I have a PC object with attribute of type object referencing to Employee object type. I want the user to choose the PC and Employee in their respective custom fields and the post function will put the value of the Employee in the attribute of PC. I have used the example above to do it with attributes of type text and it works. How to do it with Object types.

Thanks,

Tanya Tranter March 4, 2018

pcAttributeValueBean.setReferencedObjectBeanID(employeeObject.getId())

Eric Collins September 11, 2018

Does anyone have a working example of this? Trying to get something working and having a hard time. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events