I try to set a validator on transition: allow transition "Start Progress" only if the issue is in Active Sprint using JMWE plugin. I use Groovy script "issue.get("Sprint")*.active". When I test this script, it returns true on the issue in Active Sprint and false for issues in Closed and Future Sprint. But after publishing workflow, the validator doesn't work: issues in Closed and Future Sprints are allowed to make transition.
issue.get("Sprint") actually returns a collection of Sprints: the active Sprint, plus all the closed Sprints the issue potentially belonged to before. To get the active sprint, use:
issue.get("Sprint")?.find{it.active}
To create a condition or validator from that, and to be safe, use:
!!issue.get("Sprint")?.find{it.active}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Barys Harbacheuski did you figure this out?
I;m looking for same condition on the post function.
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.