Groovy to create list of users based on selected checkboxes

I'm pretty new to Groovy, so this might be a stupid question...

Anyway, I'm have a list of departments each with an associated POC. My project has a checkbox field that lists all the departments. The user can select one up to all 11 of them. From that, I would like to populate a list of people that need to signoff on the issue.

I already have a Groovy script running via JMWE post function "Set Field Value to constant or Groovy expression " that removes the dept after the signoff is complete for that dept.

Since I have no way of knowing how many departments will be selected, it seems like groovy would be the way togo. However, I can't figure out how to iterate through the list and have it append a user name to a multiple user field for each dept.

Any help would be much appreciated!

 

As an aside, are there any good resources out there to learn what/how I can do in JIRA with Groovy?

0 answers

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published yesterday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

70 views 0 5
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