Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get IssueType using ProjectKey (JAVA API)?

Ramesh Lakshmanasamy August 1, 2018

I need to get Issue Type using Project Key in the way of JAVA API.

3 answers

1 vote
Ajay _view26_
Community Champion
August 1, 2018

Example for getting the IssueType

ComponentAccessor.getConstantsManager.getAllIssueTypeObjects
0 votes
Alexey Matveev
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.
August 1, 2018

Hello,

If you want to get all issue types for a project, it will be like this

import com.atlassian.jira.component.ComponentAccessor

def projectKey = "you project key"
def project = ComponentAccessor.getProjectManager().getProjectByCurrentKey(projectKey)

ComponentAccessor.getIssueTypeSchemeManager().getIssueTypesForProject(project).each{
log.error(it.getName())
}
Sohail Anwar July 8, 2019

is this any api ?

0 votes
Bastian Stehmann
Community Champion
August 1, 2018

Hi @Ramesh Lakshmanasamy,

I do not get what you try to do.

Do you want to get all issue types that are available in the project identfied by the project key?

Or do you mean the issue key and want to get the issue type of a specific issue?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events