Dear support,
we had created a custom field of type text then we were able to retreive the value in validtor script (groovy , script runner). While changing it to the label field , it gives below exception of hash...
Exception: groovy.lang.MissingMethodException: No signature of method: com.atlassian.jira.issue.managers.DefaultIssueManager.getIssueObject() is applicable for argument types: (java.util.LinkedHashSet) values: [[PRO-43]]
Possible solutions: getIssueObject(java.lang.Long), getIssueObject(java.lang.String), getIssueObjects(java.util.Collection)
code is beloe... if "Parent Task ID" created text type then code is ok.. while if it is Label type then throws exceptions..
+++++++++++++
import org.apache.log4j.Category
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.util.DefaultIssueChangeHolder
import com.atlassian.jira.issue.issuetype.IssueType
import com.atlassian.jira.issue.IssueFactory
import com.atlassian.jira.issue.IssueKey
import com.atlassian.jira.issue.IssueImpl
def parentTaskID = cfValues['Parent Task ID'];
if (parentTaskID == null || parentTaskID == '') {
return true;
} else {
def parentIssue = ComponentAccessor.getIssueManager().
getIssueObject(parentTaskID);
def isValid = parentIssue != null &&
parentIssue.projectObject.key == issue.projectObject.key && (parentIssue.issueTypeObject.name == 'Review Task' || parentIssue.issueTypeObject.name == 'Test Task');
return isValid;
}
++++++++++++++++++++++++++