The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

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 Champions.
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?

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events