Forums

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

How do I automate a field based on the domain?

Nicholas Ren
Contributor
August 26, 2022

Hi Community, 

I have a field called Organisation and I'm looking to create an automation that sets the field to a value based on their domain when the issue is created.

For example if their domain is @XYZ.com then the Organisation field would be set to XYZ.

 

Thanks.

2 answers

1 accepted

2 votes
Answer accepted
Rik de Valk
Community Champion
August 26, 2022

Hi @Nicholas Ren

You can use Smart Values to get the Reporters email address and use text functions to manipulate it. But there seem to be some limitations with combining operations and with using operations in combinations with Variables.

You can easily get the "gmail.com" part from "john.smith@gmail.com" by using this as the value in your automation rule:

{{assignee.emailAddress.split("@").last}}

But I couldn't figure out yet how to further slice it down to just "gmail". The below code doesn't work.

{{assignee.emailAddress.split("@").last.split(".").first}}

I read this post that suggest to use entity properties instead. Maybe you can play around with that to see if you can get that working.

Have a nice day!

1 vote
Alex Koxaras -Relational-
Community Champion
August 26, 2022

Hi @Nicholas Ren 

Why you don't use the built-in Organization functionality that comes with JSM projects?

https://support.atlassian.com/jira-service-management-cloud/docs/group-customers-into-organizations/

Nicholas Ren
Contributor
August 28, 2022

Hi @Alex Koxaras -Relational- 

I would but some of our Service Desk tickets contain sensitive information and we don't want our staff to be able to search for these tickets in the Service Desk portal. 

Due to this, we need to close off the Org filter and to do that, we can't use the Org functionality.

 

Thanks.

Alex Koxaras -Relational-
Community Champion
August 29, 2022

If you don't want your stuff to search for these tickets, then you should setup the issue security scheme with the corresponding security levels. That would be  the way to go.

Nicholas Ren
Contributor
August 29, 2022

This is helpful. I'll take a look into this too.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events