How to get request type key from the request type name for specific JSD project

Dusan Spaic January 29, 2020

Hi everyone,

 

In my java code, for a specific JSD project, I need to get the request type key from the request type name.

 

I need that information because I want to set the request type with a specific name to a issue. For that I need to create something similar to VpOrigin object that contains portal key and request type key, for example:

jsd/40bb8343-8c9d-470d-8f10-071f64ca208c

Portal key is easy to get from the issue, but I dont see how to get the request type key.

One idea could be to use 

com.atlassian.servicedesk.api.requesttype.RequestTypeService

and it's method getRequestTypes. In a parameter I see RequestTypeQuery but I dont see inside how to limit the search on the specific JSD project (I have the request types with the same name in different JSD projects thats why).

 

Thank you

 

1 answer

1 accepted

0 votes
Answer accepted
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 30, 2020

Hello @Dusan Spaic ,

I will try to help as much as possible here, but please notice that this is not the best place to get help on development related questions. The right resources are the ones listed in https://developer.atlassian.com/resources:

 

Once this has been said, if my understanding is correct you are looking for a way to get the request type key(s, not the ID) for a specific JSD project (or service desk).

Looking at the Jira Service Desk Server Java API I believe that you should review the methods in the package: 

com.atlassian.servicedesk.api.request.type
Specifically, please see:

 

I hope this helps.

 

Cheers,
Dario

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events