Hi,
We are using Jira 6.3 and wanted to upgrade to Jira 7.0.11. I tested few of the existing scripts on the new server, but ended up with lot of errors. Most of these errors are related to type casting because of deprecated versions. I tried fixing most of them, but have a problem with one function call in my script.
The error is [Static type checking] - Cannot return value of type java.lang.Object on method returning type com.atlassian.jira.user.ApplicationUser.
The line where the error is in the below code snippet where I am trying to return the ApplicationUser, but the return type of qaContact?.getValue(foundIssue) is an Object.
Code Snippet:
if (foundIssue != null)
{
def qaContact = ComponentAccessor.getCustomFieldManager().getCustomFieldObjects(foundIssue).find {it.name.equals(FIELD_NAME)}
return qaContact?.getValue(foundIssue)
}
How can I fix this issue?
Thanks in advance.