Adding a Post Function Condition as a ticket is being generated assigning request type
Asked by Jonathan Layton:

I created a new project in JIRA service desk and am trying to route the ticket as it is being generated.

When the user or service tech is filling out the create ticket form, we have cascading custom filters narrowing why they are creating a ticket. The request type "Service Request" is our default, and once a ticket is created and assigned a ticket number as a "Service Request" you cannot change the request type post creation.

I located the workflow diagram and selected the arrow in between the starting point, and when the workflow reaches **Open.**

When you click on the arrow, and select Post Functions highlighted below, it opens a menu with available options.

I'm looking to add a query checking this custom field selection, and if confirmed, to proceed in creating the ticket as an incident, instead of the default "Service Request" Request type. I created issue types exactly the same for both request types and can't see where I can automate this process before the ticket is created.

Here is the JQL code that works when I test for validation:

project = NEWP AND "All Brand Issue Type - Request Form\[Select List (cascading)\]" in cascadeOption(13771, 13780)

Thanks for your support on this and looking forward to your response.

- Jonathan

**![Transition - Create.png](https://community.atlassian.com/t5/image/serverpage/image-id/311406iE0781EB374B2AFDB/image-size/large?v=v2&px=999 "Transition - Create.png")**

**![Post Function Transition.png](https://community.atlassian.com/t5/image/serverpage/image-id/311407iEA6C7BF26FB248C2/image-size/large?v=v2&px=999 "Post Function Transition.png")**


Answers:
author: Pablo Vergara
body: Hi [@Jonathan Layton](/t5/user/viewprofilepage/user-id/5450047)

**Welcome to the Atlassian community forums!**

Given you want to use a JQL statement, I don't see a **native** Jira post-function can achieve the outcome you are describing here.

*What would I suggest?* - Using Jira's native Automation for Jira feature to edit the issue once automatically created and change the request type (since you're dealing with a JSM-type of project) to an Incident request type.

Remember that to apply this workaround and automation rule, you must have an "Incident" request type mapped to the same issue type the original request types belong to; otherwise, the execution will fail (Atlassian describes this limitation as part of the action itself).

Refer to the first and second attached captures below as a configuration example.

I hope this gives you an idea or helps you brainstorm new ways to achieve your goal.

*- Pablo Vergara / SSE - ServiceRocket*

![Screenshot 2024-03-11 183009.png](https://community.atlassian.com/t5/image/serverpage/image-id/311433iA4A96ED390A0076F/image-size/large?v=v2&px=999 "Screenshot 2024-03-11 183009.png")

![Screenshot 2024-03-11 184011.png](https://community.atlassian.com/t5/image/serverpage/image-id/311434i762A4DAA63C4C886/image-size/large?v=v2&px=999 "Screenshot 2024-03-11 184011.png")

comments: author: Jonathan Layton
body: Hello Pablo,

Thanks for the quick detailed response. I have tried your suggestion and you are correct, it fails every time because I'm only able to create 1 issue type and assign it to only 1 request type. I even tried assigning \[System\] Incident to the Default Service Request Workflow, but it still doesn't appear as the same request type when I try to edit.

If there is a way I can call a created issue type "Corporate Support" and assign it to 1 or more request types? I'm testing with both **Service Request** , \& **Incident** Request Types, and if I'm able to I will be successful in this use case.   

Is there anyway to do that?

Thanks so much for your help on this.

- Jonathan

![Screenshot 2024-03-12 113321-2.png](https://community.atlassian.com/t5/image/serverpage/image-id/311604i55F293965B668097/image-size/large?v=v2&px=999 "Screenshot 2024-03-12 113321-2.png")![Rule issue type error.png](https://community.atlassian.com/t5/image/serverpage/image-id/311605iACBDBA176470A13E/image-size/large?v=v2&px=999 "Rule issue type error.png")


author: Jonathan Layton
body: Success! I was able to assign the issue request scheme to the default service desk workflow for both issue types. The automation is now working.

Thanks for the assist.


author: Pablo Vergara
body: Thanks for confirming, [@Jonathan Layton](/t5/user/viewprofilepage/user-id/5450047) - please mark my answer as "*accepted*" so it helps the site statistics and my contributor's score.

Have a great day!

- *Pablo*


Tags: cloud

jira-service-management

jira-service-management-cloud