I am trying to do a simple validator that checks to see if more than one component has been selected. I have been trying to use scriptrunner, but I am definitely missing some fundamental logic here. I've tried researching and scrapping a few different things together. I found some deprecated solutions, but nothing that works after 7.0.
Here's what I have:
import com.atlassian.jira.component.ComponentAccessor
def compnum = issue.componentObjects*.size()
compnum = 1
Any help would be much appreciated.