Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JMWE validator "Issue is in Active Sprint" doesn't work

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.Screenshot_1.pngScreenshot_2.png

2 answers

1 accepted

0 votes
Answer accepted

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}

@David Fischer _Innovalog_ just got back to this question :) Thanks for solution!

Hi @Barys Harbacheuski  did you figure this out?

I;m looking for same condition on the post function.

Hi @Ash

Solution below works well, if it's still relevant for you.

Like Ashish_Kanaparthi likes this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

Bitbucket Smart Commits vs. Genius Commits - What's the difference?

If you already heard about Smart Commits in Bitbucket, know that you just stumbled upon something even better (and smarter!): Genius Commits by Better DevOps Automation for Jira Data Center (+ Server...

114 views 0 2
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you