Hi all!
I have Assets Scheme like this:
ID | Attribute Name | Type | Type Value |
151024 | Status | Status | |
150265 | Name | Default | Text |
151176 | Client | Default | Select |
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...
UPD: here's a line to set Status attribute:
objectAttributeBeans.add (objectAttributeBeanFactory.createObjectAttributeBeanForObject(newObjectBean, statusObjectTypeAttributeBean, "Active"));
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.