Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Help: How to change the default value of Request Type when creating a issue with Script-runner

Angel Salazar March 14, 2025

 

Hello, I hope you can help me with a requirement I need because I can't find the correct syntax to solve what I need. To put in context a customer raises a ticket requesting this: If a ticket is created without Request Type or the default value “no request type” is left the default request type value must be changed based on the issuetype selected:

- If the issuetype is Incident: The default request type should be Other Incidents.

- If the issuetype is Request: The default request type should be IT Help Request.

Example: if when creating an incident in the creation screen I select “incident” as issuetype and I do not select any request type (its default value is “no request type”) I want that when the ticket is created the request type field is not empty or “no request type” as it was done in the creation, the value of the field must now be “other incidents”.

I don't know if to implement it as a scriptrunner postfunction or in a listener, and I can't find the syntax to solve this. It is worth noting that the project is JSM Cloud. If you have any recommendation I would appreciate it very much.

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Marc - Devoteam
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.
March 15, 2025

Hi @Angel Salazar 

Customers can only raise issues via the portal only Request Types are visible on the portal, so each issue created via the portal will have a Request Type set.

Only agents could raise issues from the backend via the create button, then create an automation rule that if request type = a then request type = x else issue type = b then request type = y

But best practice is to even have agents make request via the portal to make sure the correct input is provided.

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events