Hi guys,
Looking at the Jira 5.0 REST API I am unable to see a call that will give me all issueTypes from a given project.
Then I thought that I might be able to use the JQL search REST call to accomplish this:
/rest/api/latest/search?jql=project='MyProject'%20ORDER%20BY%20issueKey&fields=key,issuetype
The JQL is really simple: project='MyProject' ORDER BY issueKey
However, this is giving me a list of every issue in the project. I will then have to do some processing on the results to find the unique issue types which is quite inefficient.
Is there some kind of unique/distinct modifier I can provide in the JQL to return only a list of issue types from a single project?
Community moderators have prevented the ability to post new answers.
I could not find a way to filter issueType based on the project.
In the end, I just used the following REST resource:
/rest/api/2/issuetype
doesn't ORDER BY needs ASC or DESC?
try this line
/rest/api/latest/search?jql=project=<YourProject> ORDER BY issuekey ASC
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, I don't believe ORDER BY needs ASC/DESC. By default, the field's own sorting order will be used. https://confluence.atlassian.com/display/JIRA051/Advanced+Searching#AdvancedSearching-ORDERBY
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
oh i see..sorry for misunderstanding
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yeah, but it doesn't answer the original question. The closest I have come is to get a list of issueTypes accessible to the current user using:
/rest/api/2/issuetype
However, it doesn't look like this can be filtered on a per-project basis :(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.