Default issue type in issue type scheme using the API

Ido Zak November 20, 2022

Hey,
I am writing a Jira plugin using the JAVA API and I try to gather information about issue type schemes.
I call the IssueTypeSchemeManager.getAllSchemes(), the result type is a list of FieldConfigScheme. The FieldConfigScheme has information about id, name and description (among others) but I cannot find the default issue type for each issue type scheme.
I tried looking at different APIs and the getField, tried looking for previous questions in the community and even at GitHub examples.
I saw you can get the default for a project, but there might be issue type schemes that are not connected to a project.
Can anyone help with it?

Thanks,

Ido

1 answer

0 votes
Tuncay Senturk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 20, 2022

Hi @Ido Zak 

You are right, you have to provide Project to get the default issue type for the scheme if you use this method.

IssueType getDefaultIssueType(Project project)

You can get the default issue type for the specified issue type scheme using the IssueTypeSchemeService.getDefaultIssueType method.

I hope it helps!

Ido Zak November 21, 2022

@Tuncay Senturk Thanks!
Unfortunately I am using version 7.13 so I do not have the IssueTypeSchemeService class

Tuncay Senturk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 21, 2022

Hmm, that's quite an old version, how about upgrading? :) 

Suggest an answer

Log in or Sign up to answer