## Aim: Report on JIRA issues that need attention, and provides a status of the components
##
## Details:
## Need to loop over a list of Commons component (not Sandbox or Dormant; and not any dormant/retired ones that have their own jira)
## Report on:
## # of new issues this month
## for each version:
## # of issues open and closed per version
## List each unversioned issue
##
##
## A Jira Swizzle script from dblevins for pulling out information from the Commons JIRAs on the
## issues we've not made a decision on yet
##
#set( $void = $params.required( "username" , "[a-zA-Z0-9]+", "the username to be used for XML-RPC authentication" ) )
#set( $void = $params.required( "password" , "[a-zA-Z0-9]+", "the password to be used for XML-RPC authentication" ) )
#set( $void = $params.validate() )
##
#set( $jira = $xmlrpc.connect("${username}:${password}","http://issues.apache.org/jira/rpc/xmlrpc") )
##
Commons JIRA Report
#set( $projects = $jira.getProjects() )
##
#foreach( $project_key in ["BEANUTILS","BETWIXT","CHAIN","CLI","CODEC","COLLECTIONS","CONFIGURATION","DBCP","DBUTILS","DIGESTER","EMAIL","FILEUPLOAD","IO","JEXL","JXPATH","LANG","LOGGING","MATH","NET","POOL","SCXML","VALIDATOR","VFS"])
##foreach( $project_key in ["JELLY"])
#set( $versions = $jira.getVersions($project_key) )
#set( $versions = $versions.subtract($versions.equals("id", "-1")) )
#set( $project = $projects.equals("key", $project_key).get(0) )
##
#foreach( $version in $versions )
##
#if( ! $version.released )
#set( $url = "http://issues.apache.org/jira/secure/IssueNavigator.jspa?view=rss&decorator=none&reset=true&pid=${project.id}&fixfor=${version.id}" )
#set( $issues = $rss.fetch($url).issues )
#set( $unresolvedIssues = $issues.equals("resolution", "Unresolved") )
#set( $resolvedIssues = $issues.subtract($unresolvedIssues) )
#set( $notableIssues = $unresolvedIssues.greater("votes", 1) )
#if( $issues.size() != 0 )
- ${version} - ${resolvedIssues.size()} / ${issues.size()}
#if( $notableIssues.size() != 0 )
#foreach( $issue in $notableIssues )
- [$issue.key] ($issue.votes votes | $issue.comments.size() comments) $issue.summary
#end
#end
#end
#end
#end
##
#set( $url = "http://issues.apache.org/jira/secure/IssueNavigator.jspa?view=rss&decorator=none&reset=true&pid=${project.id}&fixfor=-1" )
#set( $issues = $rss.fetch($url).issues )
#set( $issues = $issues.equals("resolution", "Unresolved") )
#if( $issues.size() != 0 )
- Unversioned - ${issues.size()}
#foreach( $issue in $issues )
- [$issue.key] ($issue.votes votes | $issue.comments.size() comments) $issue.summary
#end
#end
#end
## Do I need to xmlrpc.logout?