I am trying to set the issue Request Type on a Jira Service Desk project.
I am in exalate script, Jira side, incoming script.
I tried all the flavours I know:
issue.customFields."Request Type".value = requestType // the name issue.customFields."10010".value = requestType // the name
issue.customFields."Request Type".value = requestTypeID // a string with the "ID"
issue.customFields."10010".value = requestTypeID // a string with the "ID"
But I always get an error that tells me that request type has not been found, and lists the available request types.
Fact is, the request type I am assigning, is present in the project’s configuration!
Setting the Request Type in Jira Service Management (formerly Service Desk) via Exalate’s scripting can be a bit tricky, because the Request Type field is a special system field and not a regular custom field. Assigning it directly like a normal custom field (e.g., issue.customFields."Request Type".value = ...) won’t work.
Here’s how you should set the Request Type in your incoming sync script on the Jira side:
// Replace 'serviceDeskKey' and 'requestTypeKey' with your actual values
def serviceDeskKey = "YOUR_PROJECT_KEY"
def requestTypeKey = "YOUR_REQUEST_TYPE_KEY" // e.g., "getithelp"
issue.setRequestType(serviceDeskKey, requestTypeKey)
serviceDeskKey is your Jira Service Management project key (e.g., “ITSD”).
requestTypeKey is the unique key of the request type (not the display name or ID). You can find this key in the URL when editing the request type in Jira, or via the Jira REST API.
Important:
The setRequestType method is the supported way to set the request type in Exalate scripts for Jira Service Management.
The value you pass as requestTypeKey must match the key (not the name or ID) of the request type as defined in your Jira project.
Is there a limit on the number of Request Types that Exalate can map?
Because, strange enough, the number of the "known” request types that Exalate tells me in the error message text is exactly 50, while in the Project’s configurations there are many more.