Similar to how users can be added/removed as auto-assignees from Components, I want to achieve similar functionality based on the value of a custom field. I've been able to accomplish this by setting up a listener in ScriptRunner. However, all of my users are currently hard-coded into the script. Additionally, all of the expected values of the custom field are hard-coded into the script. While I realize this was a convoluted way to solve the problem, it was meant to be more of a rapid prototype than anything else.
Now that I've figured out how I want the listener to work, I need to find a better way to manage the users being notified in it. I'm comfortable with setting up REST endpoints and possibly adjusting the UI, if that's what it takes. I've been able to follow the tutorials on the ScriptRunner site so far. The only caveat here is that I have to vet this through our IT department first. So, I need it to be fairly straightforward to implement and maintain through them.
Example of the listener logic:
Project 1
Area: Production --> User1
Area: QA --> User2
Project 2
Area: Production --> User3
Project 3
Area: QA --> User4
Project 4
Area: Production --> User3
Area: QA --> User4
What's the best way to approach this? Should I start by using several cascading select fields?
Current versions of what we're using: Jira Server (8.4.2), ScriptRunner (5.6.6)