Hi community,
I'm working on a Jira Data Center instance (version 9.12.12) and facing an issue when trying to retrieve the issue type of an issue programmatically.
When using the Atlassian Java API:
<span>issue.getIssueType().getName()</span>
It returns an unexpected or incorrect issue type.
However, when I fetch the same issue via the Jira REST API:
<span>GET /rest/api/2/issue/{issueIdOrKey}</span>
It returns the correct issue type.
I have created a custom issue type called "Feature". That feature is associated with this issue, KSD-8.
While fetching this issue through JQL via Atlasian Java classes in the data center, the response in which issue type was expected issue type, is "Feature", but the Java API returns "Epic" instead.
Here is the correct REST API response:
<span>"issuetype": {
"self": "http://localhost:2990/jira/rest/api/2/issuetype/10014",
"id": "10014",
"description": "conversion of epic",
"iconUrl": "http://localhost:2990/jira/secure/viewavatar?size=xsmall&avatarId=10307&avatarType=issuetype",
"name": "Feature",
"subtask": false,
"avatarId": 10307
}</span>
What I've Tried:
Question:
Why does the Java API return the wrong issue type (e.g., "Epic") when the REST API and UI clearly show the correct type ("Feature")?
Any help or suggestions would be greatly appreciated.
Thanks in advance!
Sainath Bembre