It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

KCF-Pro SocOptionImpl / KPOption import

Andrew Boutin Mar 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

2 votes
Answer accepted
Florin Manaila Mar 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!

Andrew Boutin Mar 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 Jan 20, 2017

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
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Next-gen

Introducing subtasks for breaking down work in next-gen projects

Teams break work down in order to help simplify complex tasks. This is often done iteratively, with tasks being broken down into smaller tasks and so on until the work is accurately captured in well-...

9,990 views 46 44
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you