| ## Produce a report in xdoc format that shows plugins and their open issues, |
| ## sorted descending by the total number of votes for each plugin. |
| ## |
| ## |
| #set( $jira = $xmlrpc.connect("swizzletester:swizzle","http://jira.codehaus.org/rpc/xmlrpc") ) |
| #set( $projects = $jira.getProjects().matches("name", "Maven 2.*Plugin") ) |
| <?xml version="1.0"?> |
| <document> |
| <properties> |
| <title>Maven War Plugin Votes</title> |
| <author email="jason@maven.org">Jason van Zyl</author> |
| <author email="jtolentino@apache.org">John Tolentino</author> |
| </properties> |
| <body> |
| #foreach( $project in $projects ) |
| #set( $url = "http://jira.codehaus.org/secure/IssueNavigator.jspa?view=rss&&pid=${project.id}&status=1&sorter/field=issuekey&sorter/order=DESC&tempMax=100&reset=true&decorator=none" ) |
| #set( $jirarss = $rss.fetch( $url ) ) |
| #set( $project.attributes.totalVotes = $jirarss.issues.sum("votes") ) |
| ## keep the issues in case you want them later |
| #set( $project.attributes.issues = $jirarss.issues ) |
| #end |
| #foreach( $project in $projects.descending("@totalVotes") ) |
| <section name="$project.name ($project.attributes.totalVotes Votes)"> |
| <table> |
| <tr> |
| <th>Votes</th> |
| <th>Issue Summary</th> |
| </tr> |
| #foreach( $issue in $project.attributes.issues.descending("votes") ) |
| <tr> |
| <td>$issue.votes</td> |
| <td><![CDATA[$issue.summary]]></td> |
| </tr> |
| #end |
| </table> |
| </section> |
| #end |
| </body> |
| </document> |