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

Update Insight Object attribute which is a type of Select

Ksenia Abdulina April 12, 2023

Hi all! 

I have Assets Scheme like this: 

IDAttribute NameTypeType Value
151024Status Status 
150265NameDefaultText
151176Client DefaultSelect

 

From my issue I want to update Asset object using Scriptrunner (as in-built Post function doesn't suit my needs, cause I have Extension for Jira Service Management plugin installed and use Bundlefields). 

I'm able to set value for the Name attribute as follows: 

objectAttributeBeans.add (objectAttributeBeanFactory.createObjectAttributeBeanForObject(newObjectBean, nameObjectTypeAttributeBean, serverName));


But how can I set the Status value and Client value? If I use construction mentioned above I got plain text and not pretty-look green status for Active server, and Client as plain text and not one of the selected items... 

1 answer

1 accepted

1 vote
Answer accepted
Ksenia Abdulina April 14, 2023

UPD: here's a line to set Status attribute:

objectAttributeBeans.add (objectAttributeBeanFactory.createObjectAttributeBeanForObject(newObjectBean, statusObjectTypeAttributeBean, "Active"));
So the last questions is about Select attribute type :) 
Any thoughts? 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events