I would my listener on the sprintCreatedEvent to only be triggered on a certain project. Currently the script below creates a version in a project when there is a sprint created in every project.
{code}
{code}
Hi Sar,
Which version of SR and JIRA are you using? This script works fine for me. Have you made sure that you added the validator to the correct workflow step?
Could you try adding a logging statement to see which groups the currentUser is in?
import com.atlassian.jira.component.ComponentAccessor
def groupManager = ComponentAccessor.getGroupManager()
def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
log.debug(groupManager.getGroupNamesForUser(currentUser))
groupManager.isUserInGroup(currentUser, "Murex Task Team")
What is output to the log after using this script as a validator?
Make sure you are using Simple Scripted Condition, or Simple Scripted Validator. A screenshot would help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Guys,
I am so sorry for not replying earlier.
The reason it was not working was because I was using Custom script condition instead of Simple scripted condition.
All good now.
Thank you :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Custom script condition should work, except if you're on an old version of the plugin. If you are, you need to set passesCondition to a boolean. Simple scripted condition is easier.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.