The title is a little vague. I'll explain my use case.
Let's say user1@contoso.com emails support, and it generates a ticket. Here's what I want to happen:
- See "contoso.com" and change a custom field "Customer" to "Contoso Inc"
- See the customer is "Contoso Inc" and change custom field "Team" to "Team one"
- Assign the ticket to that team.
I have 1 working using ScriptRunner. I have a simple hash table that has all the customers and their domains. It gets the reporter email and sets the customer.
I could technically make another identical rule, with another hashtable with every customer, and the team associated with them, but that just seems dirty. I'd really like a way to store the associations outside a hash table in a Groovy script.
What I'd like to do, is store the customers in a DB, and have "Name", "Team" and "Domains" as fields. So if Customer = "Contoso Inc" then customer.team = "Team one" and link these in the custom field, so if "Customer" is set, it sets the team, and any other fields I add down the line.
I'm 100% open to using external plugins for this, just wanted to see if anyone has anything similar setup before hammering at it for the next few days.