Jira 8.5.1, ScriptRunner 6.33
I have the ID of a version and am trying to get its name, but Behaviours doesn't respect the getVersion() method.
Script:
import com.atlassian.jira.component.ComponentAccessor
def fixV = getFieldById(getFieldChanged())
def fixVValue = fixV.getFormValue()
def VersionManager = ComponentAccessor.getVersionManager()
def newFixVersion = VersionManager.getVersion(fixVValue)
Error on last line:
Cannot find matching method com.atlassian.jira.project.version.VersionManager#getVersion()
getVersion is a method of VersionManager:
https://docs.atlassian.com/software/jira/docs/api/8.5.1/com/atlassian/jira/project/version/VersionManager.html#getVersion-java.lang.Long-
Why does Behaviours not respect that method?