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"));
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.