Hello -
New to ScriptRunner, so bare with me!
Problem: I want to implement "advanced" security that will restrict users from creating a ticket under certain factors..
- Factor 1: the user must be provisioned to create issues in the system.
- Factor 2: If the user is attempting to enter a value for Priority on creation of issue, then they must be apart of a Power User group.
- Factor 3: If the user not attempting to enter a value for Priority on creation of issue, then they will be allowed to create issue as long as they meet the criteria for Factor 1.
Solution: I thought I may be able to use Workflow and ScriptRunner to implement this.
Implementation: In my workflow, I have the following:
- Added a validator for the Create transition
- Validator 1: Only users with Create Issues permission can execute this transition.
- Validator 2: Script Runner Script
Validator 2 is where I am "stuck" at and need some assistance. I've been looking at guides at what logic to write, but am having trouble piecing together Jira Expressions. None of the examples show if/else logic, so not sure if I can do that with these validators? Can anyone point me in the right direction?