Forums

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

How to get request types for an issue type?

Sourav January 29, 2024

Hi I am using Jira's Service Desk Management API to create an issue. The issue is created however it doesn't get a request type assigned automatically. I can't do anything via portal because I am trying to create something like a connector!

My question is is there a way I can get all the request types that are allowed for an issue type? Because while creating the ticket/issue I am able to find and set the custom field that corresponds to `request-type` of that issue.

1 answer

1 accepted

1 vote
Answer accepted
Mikael Sandberg
Community Champion
January 29, 2024

Hi @Sourav,

Welcome to Atlassian Community!

Please make sure you are using the API for JSM to create your request, that is the only one that can set the request type. If you are using the API for Jira Cloud you cannot set the request type and have to manually do it. 

Sourav January 29, 2024

Hi @Mikael Sandberg Yes I am using JSM API however right now I fetch all request types and pass a random request type which sets it but shows an error on the portal saying that the request type is incorrect. My question is how can I fetch the request type that is allowed for an issue type?

Mikael Sandberg
Community Champion
January 29, 2024

In order to know the request types that is associated with an issue type you would have to get the issue types and then use the issue type Id to compare that to the result from Get request types/Get all request types. But when you create the request via Create customer request you do not need to know the issue type, all you need are requestTypeId and serviceDeskId, which you can get from Get request types/Get all request types.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events