Forums

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

How do I auto assign tickets on service desk using custom people field?

Kelly Robinson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 22, 2022

Hi All, 

Hoping you can give me a hand, service desk projects/JIRA is not something I am super familiar with but I've been put on a project at work which requires this solution and somehow I've ended up building it myself. 

I have 3 request types each with a custom people field for requester to specify who needs to work on their request. I am hoping to auto-assign based on the person/user that the requester selects in this field. 

 

So far I have tried to set up a rule in automation but maybe I am getting the field choices wrong. Could anyone guide me?

 

This is the page I'm on atm and where I'm up to but cannot get past this spot. My idea was to create a rule for each person we would assign to as there are only around 10. 

 

Screenshot 2022-06-22 at 16.01.56.png

2 answers

0 votes
Ansari_ Amir February 16, 2024

I found a solution, please follow the below steps. Thank me later :)

Requirement: Need to automatically assign tickets to specific groups upon creation.

Step1: Create a group by locating the “Teams” option on the navigation bar in Jira.

Step 2: Once you have created the groups, associate the Teams custom field with the desired screens of your project and attach it to the issue view of your ticket from Request Types.

Now we need to setup Jira Automation to automatically assign the ticket to the desired group upon creation.
Step 1: Go to Automation under your project settings and click on Create Rule button.

Step 2: Search and select “issue created” in the trigger section.

Step 3: Click on “IF: Add a condition“ and select “JQL condition“

Step 4: Type in the below highlighted JQL query and click on “Next“.

Query:
issuetype = "[System] Service request with approvals" OR issuetype = "Employee onboarding"

Note: You can find the issue types by going to issue types in your project settings.

Step 5: Click on “THEN: Add an action” and search and select “Edit issue“

Step 6: Under Choose fields to set select “Assignee“

Step 7: Click on “More options“, and uncheck “Send notifications?” and put in the below-mentioned JQL script.

Query:

{
"fields": {
"customfield_10001" : "7ec8fedc-dd3d-4d8c-ba44-231cc605c697"
}
}

Note:
1. The above highlighted customfield_10001 is the customfield id of your team custom field.

You can locate this customfield in the url field of your team customfield page. (Click on the 3 dots on the extreme right and click on "View field Information"

The above highlighted alphanumeric text is the team id (7ec8fedc-dd3d-4d8c-ba44-231cc605c697) of your specific team that you need to set as the default assigned group.
You can locate this team id in url field of your team’s page.

Step 8: Click on “Turn on rule”

Step 9: Create a ticket from the customer portal to see your team automation rule in action.

0 votes
Sam Nadarajan
Community Champion
June 22, 2022

Hello Kelly, and welcome to the Community!

You're definitely on the right track, unfortunately the automation library doesn't support using the no-code functionality to copy the user value from a custom field to the user value.

What you can do is use the "Edit Issue" action, then in the `More Options` section, paste in the following JSON:

{
"fields": {
"assignee": { "id": "{{issue.worker.accountId}}" }
}
}

In the above snippet, replace "worker" with whatever the field name has the user value. In this case, the field you called "Users" in your screenshot is what I'm calling "Worker".

Your automation rule would look something similar to this:

 

Screen Shot 2022-06-22 at 1.30.23 PM.pngHope this helps! 

Kelly Robinson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 24, 2022

Hi @Sam Nadarajan  this looks like it could work. However, when I try to set the condition my field doesn't appear in the drop-down. Any ideas?

Sam Nadarajan
Community Champion
June 24, 2022

Hello @Kelly Robinson can you send me a screenshot of what the dropdown is saying? What's the name of the field and the field type?

A workaround would be to use the Advanced JQL condition and put the field in there, but I'd like to figure out why your particular field is not appearing.

Suggest an answer

Log in or Sign up to answer