Hi Community,
I'm trying to create a fast track issue post function with the following conditions:
- creator must be part of a specific group
- reporter must NOT be part of a specific group.
If both of these conditions are true then the issue skips the approval step.
If either of these conditions is false the approval will happen as normal.
Context:
We have some processes that need approval from a specific team. However, if users from that team create these requests on behalf of someone outside of the team the approval step may be skipped. If members of the team create a request for themselves, it will need approval as normally.
I've managed to get the first part working:
import com.atlassian.jira.component.ComponentAccessor
def groupManager = ComponentAccessor.getGroupManager()
groupManager.isUserInGroup(issue.creator, 'MyUserGroup')
But I'm not familiar with groovy scripting and don't know how to add the second condition.
Adding "currentUser != issue.reporter" works and will solve 90% of the use cases. But ideally I'd do this properly.