I have a versionID and I want to retrieve the project's ID, name, Key, Lead, Category, etc
I retrieve the projectID with a versionID via http/REST with:
rest/api/2/version/{versionId}
I can then retrieve the other project details from
rest/api/2/project/{projectId}
... How would I go about retrieving the same information from within scriptrunner script, without using http requests?
I've tried using the ComponentAccessor's versionManager like this:
import com.atlassian.jira.component.ComponentAccessor
def ProjectManager = ComponentAccessor.projectManager
def VersionManager = ComponentAccessor.versionManager
long version = 23958
def versionObject = VersionManager.getVersion(version)
log.warn(versionObject)
...but I can't figure out how to get the projectID from the version object in this manner.