Hello,
Im trying to make a validation in a transition where the parent check if all the sub-tasks have a cf: select list, initialized with a value.
Actually I have done this:
import com.atlassian.jira.issue.customfields.option.Option
import com.atlassian.jira.component.ComponentAccessor
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def cf = customFieldManager.getCustomFieldObjectByName("UO type")
if (! issue.isSubTask()) {
return true
}
def selectedValue = issue.getCustomFieldValue(cf) as Option
issue.subTaskObjects.every {selectedValue != null}
-> But its not working.
Thanks in advance.