I just wrote a JIRA script and I had to use the data in a KCF-Pro field auto-multiselect (issue types).
I got the custom field, converted it to a string, and logged it. It looked like a list of SocOptionImpl{label='', value='15925'}
. I needed to pull out the value (issue ids) from the objects. I ended up using the string representation and string manipulation to get the value. I originally wanted to just use the SocOptionImpl object itself since I figured it would be a simple method call to pull out the value.
I couldn't find SocOptionImpl anywhere in the documentation so I didn't know how I could import it for use in my Groovy script. Can I import this, and what's the path? I'm wondering the same for KPOption since I've had to interact with that class before. If I have to again I'd like to be able to import the class.
Thank you!
Community moderators have prevented the ability to post new answers.
Hi Andrew,
For SOcOptionImpl, we haven't exported the classes into osgi so you probably cannot use the class as it is. We do have plans to do this with one of the next releases. Anyway, the full classpath is com.keplerrominfo.jira.plugins.keplercf.pro.optionscf.customfield.SocOptionImpl
KPOption, however, is just the name of the SIL structure used to represent options for KCF PRO (it's not a class by itself, but rather an instance of one). It does not contain any data by itself (at least not in java). Please share some more context on your interaction with it.
Hope this helps!
SOcOptionImpl: OK thanks for the info. I got around it by using the string representation anyways.
KPOption : I was told that KPOption is the form that the setting the default value has to be in when asking a different question so I was just curious what the import would be in case I ran into the 'class' again. So I'm all set there too.
Thanks for the quick response and info.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How did you achieve access to the data from groovy?? Code sample please and many thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.