Moved issues doesn't return request type information through RestAPI

Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.

Summary

There is no request type information when using the RestAPI /rest/api/3/issue/:issueIdOrKey to get an issue after moving it between projects.

Environment

Jira Service Management Cloud.

Diagnosis

When using the RestAPI /rest/api/3/issue/:issueIdOrKey it is expected to see the request type element in the JSON response information. However, this information in missing in the JSON.

For this scenario, the customfield_10010 is the Request Type field.


Wrong response
"customfield_10010": {
            "_links": {
                "jiraRest": "...",
                "web": "...",
                "self": "...",
                "agent": "..."
            },
            "currentStatus": {
                "status": "...",
                "statusCategory": "...",
                "statusDate": {
                    "iso8601": "...",
                    "jira": "...",
                    "friendly": "...",
                    "epochMillis": ...
                }
            }
        },
Correct response
"customfield_10010": {
            "_links": {
                "jiraRest": "...",
                "web": "...",
                "self": "...",
                "agent": "..."
            },
            "requestType": {
                "_expands": [
                    "field"
                ],
                "id": "...",
                "_links": {
                    "self": "..."
                },
                "name": "...",
                "description": "...",
                "helpText": "...",
                "issueTypeId": "...",
                "serviceDeskId": "...",
                "portalId": "...",
                "groupIds": [
                    "..."
                ],
                "icon": {
                    "id": "...",
                    "_links": {
                        "iconUrls": {
                            "48x48": "...",
                            "24x24": "...",
                            "16x16": "...",
                            "32x32": "..."
                        }
                    }
                }
            },
            "currentStatus": {
                "status": "...",
                "statusCategory": "...",
                "statusDate": {
                    "iso8601": "...",
                    "jira": "...",
                    "friendly": "...",
                    "epochMillis": ...
                }
            }
        },

Cause

This is happening because the issue was moved from a project using the request type name e.g. "Report a bug," to a project with the same request type name. As the request type is in project scope, you can have two request types with the same name in different projects, but it doesn't mean they are the same request type; on the contrary, they are different objects.

This confusion happens because you cannot identify that in the UI. Usually, when you move a ticket to a project where there is no request type with the same name, it will be in red to easily identify that the request type must be updated. But when it is moved to a project with a request type with the same name, its name doesn't turn red, and it seems to be a valid one.

Solution

  1. It is always recommended to move the issue updating the request type information during this process. Currently, that's not required to fill the request type, but as good practice to avoid this problem, you can set the new request type (even with the same name as the source project) in the move process.
  2. Update the request type field in the UI to associate the correct project request type.
  3. Use the default request type feature for the project/issue type.
    1. Choose default request types for your issue types


Last modified on Aug 2, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.