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'
The 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
@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
Hope this helps!
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Cheers
Phil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.