Getting Options containing root option for a custom field

Hello

Is there a way in java to retrieve Options having list of root Option only ?

There is optionsManager.getOptions(fieldConfig) however it is returning options containing all Option

Any help would be appreciated, thanks :slight_smile:

Hi @IbrahimItani

try this https://docs.atlassian.com/software/jira/docs/api/8.22.6/com/atlassian/jira/issue/customfields/option/Options.html#getRootOptions

Options options = optionsManager.getOptions(fieldConfig)
List<Option> rootOptions = options.getRootOptions()

Cheers
Adam

2 Likes

Hi @adam.labus thanks for the answer, however what I want is Options class and not list of Option.
I guess there aren’t any jira api for that. I’ll stick to your answer, thanks again :slight_smile: