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

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

This widget could not be displayed.

statusObjectAttributeValueBean.setIntegerValue(141);

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

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,

pcAttributeValueBean.setReferencedObjectBeanID(employeeObject.getId())

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
Community showcase
Published Aug 22, 2018 in Marketplace Apps

How a Marketplace app tech team is achieving gender diversity

Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...

523 views 3 19
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you