I am collecting data from linked issues to show in master issue. Our products consists of multiple components. For each of the components we have a team and a Jira project. There is a Jira project for each Product where we track features and releases of products.
I've been quite successful in gathering all sorts of info from linked issues and presented for Product manager. I'd like to figure out what is the earliest date the feature is available by finding max of all versions' end dates which is Greenhopper field. So basically I need to get access to GH field for End date for Jira object Version.
There are getEndDate()
and getVerionEndDate()
methods in GH API but I desperately need an sample!
Here is what I tried in Groovy Script Runner to access version's end date without success
import com.atlassian.greenhopper.model.issue.VersionWrapper
def allVersions = ""
parentIssue.getFixVersions().each { version ->
def versionWrapper = new VersionWrapper(version)
allVersions += "Version: ${version.getName()} in component ${version.getProjectObject().getName()} planned at ${versionWrapper.getEndDate()} \n"
}
I get:
Problem loading class: startup failed: /jira-plugins/ProductComponentSync.groovy:
17: unable to resolve class com.atlassian.greenhopper.model.issue.VersionWrapper
@ line 17, column 1. import com.atlassian.greenhopper.model.issue.VersionWrapper
^ 1 error
The Reference link: http://docs.atlassian.com/greenhopper/6.0.7/com/atlassian/greenhopper/model/issue/VersionWrapper.html