The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Ryan Deyer
Contributor
October 29, 2015

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Ryan Deyer
Contributor
October 29, 2015

Figured it out...

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

    it.field == 'Assignee Group'

}

0 votes
RVal
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
October 29, 2015

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.