KCF-Pro SocOptionImpl / KPOption import

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

2 votes
Answer accepted

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.

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

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday in United States

From Atlassian: Confluence Security Advisory - 2019-03-20

Atlassian released a security advisory on 3/20/2019.  The full advisory is here:  https://confluence.atlassian.com/doc/confluence-security-advisory-2019-03-20-966660264.html In a nutshe...

22 views 0 1
View post

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you