...
This is not currently possible in JIRA Cloud. JIRA Service Desk does not provide any APIs to change an issue's request type: https://ecosystem.atlassian.net/browse/JSDECO-36
...
.
I would like to set the request type on an issue after it's been created depending on some criteria in an Automation rule. For example if the summary matches 'equipment' I'd like to set the request type to 'Request new hardware'
Step-by-step guide
Editing the request type in JIRA Server can currently only be done using the 'Advanced' block in an 'Edit issue' action. It also requires looking up the internal string name of the request type in JIRA's database by running a SQL query.
...
Lookup the request type id in your database. Connecting to your database and the SQL query will depend on your database (please contact your DB administrators if you are not sure on how to do this). To get the list of request types in your instance you can run this query (tested in Postgres):
No Format |
---|
SELECT vp."KEY" AS project, vpf."KEY" AS requestTypeId, vpf."NAME" AS requestTypeName
FROM "AO_54307E_VIEWPORT" vp
JOIN "AO_54307E_VIEWPORTFORM" vpf ON vpf."VIEWPORT_ID" = vp."ID";
//example output:
project | requesttypeid | requesttypename
---------+------------------+------------------------------------
serv | newhardware | Request new hardware
serv | newsoftware | Request new software
serv | phoneredirect | Set up a phone line redirect |
To get the request type id that the custom field expects, you combine the first two columns with a '/'. So the id for Request new hardware would be serv/newhardware.
Create an automation rule like this:
The JSON for the Advanced block is:
...
For server you can simple select the "Customer Request Type" field from the field picker
Related articles
Filter by label (Content by label) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...