restrict Priority values on edit - revisited

A) This works (restrict priorities to those with ID less than 5)

def allowedPriorities = constantsManager.getPriorityObjects().findAll{ < 5
}.collectEntries {


B) This does NOT work (attempting to restrict priorities to only 1 & 3)

def allowedPriorities = constantsManager.getPriorityObjects().findAll{ == [1,3]
}.collectEntries {


Can someone please help me with why code snippet B does not work?

Thanks in advance,




1 answer

1 accepted

Hi Conor, 

If you want to get only priorities with ids 1 or 3 then the findAll closure should be in [1, 3]

That simple smile

Thanks Thanos!

Suggest an answer

Log in or Join to answer
Community showcase
Jason Wong
Published yesterday in Agility Beta

Welcome to agility

Every team in the world is unique, and so   Atlassian believes   that each and every team's best way of working  needs to  be molded to their unique circumstances  – ...

278 views 6 15
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot