Is there a way in Groovy script to determine IF a multi select list changed?

Is there a way to determine if a multi select list changed in any way?  I know how to check if it contains a certain value, but I want to trigger if there was a change (or ideally if it didn't contain a certain value previously).

I'm doing this as part of a Custom Email Send from Script Runner.

2 answers

Figured it out...

cfValues['Assignee Group']*.value.contains('Platform') && changeItems.any {

    it.field == 'Assignee Group'

}

I would suggest to have previous selection saved in a hidden field and then compare it with the current selection. You can have field which is not visible on view/edit screen if you don't add it to these screens.

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 Thursday 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...

81 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