// Get the values of the Product field
def cf_product = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Product")
def product = issue.getCustomFieldValue(cf_product) as List
//Products teams are responsible for
def droptableProducts = ["Image Scaling / Cleanup", "OCR", "Extraction", "Recognition", "Annotation", "Text Classification", "Purge", "Solarity Services - Legacy (Java)", "Group Separation", "Model Builder", "Validation (TP)"]
...Any usual list comparison is failing at this point...
Is there something special I'm missing about pulling in list data from a multiselect customfield?
I've tried intersect, disjoint, and iterating with .any and .every and all methods seems to be returning unexpected results.
Case:
The value "Annotation" and "Text Classification" are in the product field.
def commonValue = product.intersect(droptableProducts)
If I return product I get "[Annotation]" as expected.
If I return droptableProducts I get the list as expected.
If I return commonValue, I get an empty list.
Different method:
def found = product.any { droptableProducts.contains(it) }
return found
This always returns false no matter what values are in 'Product'.
Help! :D