Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to find all the Option ID's for the Customer Request Types

PhilSpo
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 21, 2020

Hello,

Im looking to add in some Workflow Transition Conditions so that agents can only move tickets raised with a particular Customer Request Type to a particular Status.

 

I have figured out already by reading articles in the Atlassian Community that this will only work if you set the Comparison Type to 'Option ID' 'See Screenshot'

image.pngThe only thing i cant work out is how to get a list of all the Request Types and their corresponding ID's.

 

Is there a way of doing this using API?

 

Cheers

 

Phil

1 answer

3 votes
Callum Carlile _Automation Consultants_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 22, 2020

@PhilSpo If you go to your Project Settings > Request Types then click on Edit Fields for each request type, there will be a number right at the end of the URL, this is the ID for that request type.

Alternatively, you can enter:

"https://your-domain.atlassian.net/rest/api/3/issue/DEMO-1" (where DEMO-1 is the key of a Jira issue in your instance which has a request type associated with it)

By then doing a Cntrl+F if you search for requesttype it will reveal the ID of the request type used for this Jira issue (in example below, the ID of my request type is 53). You would have to repeat this for other tasks of other request types, so I think the first method would be much quicker

request.PNG

Hope this helps!

PhilSpo
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 22, 2020

Hello,

 

I managed to work it out:

 

https://your-domain.atlassian.net/rest/servicedesk/1/servicedesk/request/10071/request-types

 

brings back all the relevant request types for that issue type:

 

avatarType=SD_REQTYPE&avatarId=10508","issueType":10011,"issueTypeIconUrl":"/secure/viewavatar?size=medium&avatarId=10558&avatarType=issuetype","createScreenId":0,"viewScreenId":0,"issueTypeName":"Support","name":"Urgent Out of Hours Voicemail","description":"Out of hours urgent voicemail received","descriptionHtml":"<p>Out of hours urgent voicemail received</p>","helpText":"","helpTextHtml":"","order":0,"usedByEmailSettings":false,"groups":[],"practices":[]},{"id":42,"cvId":5,"portalKey":"ccs","portalId":5,"key":"1ea9d869-77e8-4576-ae55-ae6fdfed451e","icon":10493,"iconUrl"

 

I have underlined and bold the key that is the option ID

 

Phil



 

Callum Carlile _Automation Consultants_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 23, 2020

@PhilSpo Have you tried using this ID in your workflow condition? In the section you highlighted, I would have thought the request ID is this:

{"id":42,"cvId":5,"portalKey":"ccs","portalId":5,"key":"1ea9d869-77e8-4576-ae55-ae6fdfed451e","icon":10493,"iconUrl"

 I could be wrong though, so apologies if I am!

PhilSpo
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 23, 2020

Hey @Callum Carlile _Automation Consultants_  Yes I tried it and it works.

However I found out that the OptionID is made up of two separate parts concatenated together: portalKey/key 

So from the above example I used 'ccs/1ea9d869-77e8-4576-ae55-ae6fdfed451e'

 

As you can see below, its not very intuitive for yourself or anyone else to know what's going on if they ever need to edit the transition conditions. I will have to make a note of which key is which request type.

image.pngCheers

Phil

Like Valter Jakovlev likes this
Valter Jakovlev March 1, 2021

Hello

 

For some reason the rest call does not give me the ID-s. No key values in the REST I see. Is there another way to find these?

 

Actually I can not see the portalid either, version differences?

What is 10071 representing in thatt URL?

 

Thank you,

Callum Carlile March 1, 2021

@Valter Jakovlev What API call are you using? You will also need to have the permissions to view the portal and requests if you want to access the information via the API.

If you're looking for another way to find these IDs, there is the manual method I mentioned in the previous answer

Mitchell Wilkins March 9, 2021

So I was able to use this for a separate post function but this got me all of the information I needed! 

The 10071 is the ID of the ticket, but not the project specific key. if you export a ticket to xml that has the right service request type options you are looking for, use the key in the item section:
<key id="202996">

https://your-domain.atlassian.net/rest/servicedesk/1/servicedesk/request/10071/request-types

I put the key id from a service desk ticket I knew had the right options in the rest API above with our URL and it gave me the data needed per Callum and PhilSpo above.

Like # people like this
Valter Jakovlev March 10, 2021

Yes! this is exactly what I was looking for! Thank you very much @Mitchell Wilkins !

Jeret Shuck June 21, 2021

This worked for me as well! FANTASTIC! Thank you for the assistance here! Not clear at all to be honest. I think Jira needs to add a "condition" that can better compare the customer request type field.

Like Karolina Dylewicz likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events