Forums

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

How to determine a users location for an automation rule

Steven Lees-Smith
Contributor
April 19, 2022

Hi there,

Based on when a ticket is created and depending on where a user is located I want to populate a custom context field for our issues and requests, basically setting ticket ownership to a particular support team.

I was thinking something like

When issue created and project name = "JSM Service Desk" and if reporter.country = "Australia" then "assignedteam = "Sydney Support" elseif reporter.country = "Canada" then assignedteam = "Vancouver Support"  

so on and so forth for various projects and teams etc.

I am just not sure where to find a list of fields I can refer to for the automation and if I am heading in the right direction.

Our user information is pulled in from AD so we have everything available to us, just not sure where to look.

I suppose I need a way to map the Country from AD to a custom field per user in Jira - can this be done with Scriptrunner or something?

Just stuck on how to get Country from AD bound to a customer to user for automation.

Thanks heaps.

1 answer

1 vote
Mikael Sandberg
Community Champion
April 19, 2022

The smart values for the user properties is limited, so the closest you can get to the location is getting the time zone set in the user's profile. Another option would be to set an Entity property for each user with the location, you can then use that to assign it to the right team.

We are doing this currently based on the location group that the user belongs to. The automation looks like this:

Screen Shot 2022-04-19 at 4.31.42 PM.png

Steven Lees-Smith
Contributor
April 19, 2022

Can you set the entity property from scriptrunner or something to pull that from AD into that area or basically how are your setting the property?

Mikael Sandberg
Community Champion
April 20, 2022

It has been awhile since I used scriptrunner, but if it can access the REST API you could do it. I am using an IPaaS software to set it.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events