KCF-Pro SocOptionImpl / KPOption import

AndrewB March 17, 2016

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!

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Answer accepted
FlorinM
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 17, 2016

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!

AndrewB March 17, 2016

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.

Brian Bishop
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 20, 2017

How did you achieve access to the data from groovy?? Code sample please and many thanks! smile

TAGS
AUG Leaders

Atlassian Community Events