Using JIRA 5.2.11
I want to validate that when a issue type "Library" is selected, only components that start with "Library" can be selected.
I have to components named "Library - model" and "Library - service"
My validation error displays no matter whether the component is something else or one of the Library ones above.
Please help. Code below.
if (issue.issueTypeObject.name == "Library"){
if(issue.components*.name ==~ /Library.*/){
return true;
} else {
return false;
}
} else {
return true;
}