swizzle.swizzle-jirareport.1.4.source-code.closed.vm Maven / Gradle / Ivy
#set( $void = $params.required( "serverUrl" , "https?://.+", "the base URL where jira is available, no trailing slash" ) )
#set( $void = $params.required( "projectId" , "[0-9]+", "the numeric id the project" ) )
#set( $void = $params.required( "projectName" , ".+", "the display name the project" ) )
#if ( $email == "true" )
#set( $void = $params.required( "to" , ".+", "the email 'To' address" ) )
#set( $void = $params.required( "from" , ".+", "the email 'From' address" ) )
#end
#set( $void = $params.validate() )
##
#set( $url = "${serverUrl}/secure/IssueNavigator.jspa?view=rss&&pid=${projectId}&updated%3Aprevious=-1w&status=5&status=6&tempMax=200&reset=true&decorator=none" )
#set( $jirarss = $rss.fetch( $url ) )
#set( $issues = $jirarss.issues )
#set( $void = $date.format("yyyy-MM-dd") )
##
#if ( $email == "true" )
TO: $to
FROM: $from
SUBJECT: $projectName Issues Closed: week of $date
#end
$projectName - $date.as("EEEE, MMMM d, yyyy")
$issues.size() closed in last 7 days
#if ( $issues.size() < 11 )
#foreach( $issue in $issues )
[$issue.key] $issue.summary
- Type: $issue.type
- Assignee: $issue.assignee
- Components: $issue.components
- Fix Versions: $issue.fixVersions
- $issue.link
#end
#elseif ( $issues.size() < 30 )
#foreach( $issue in $issues )
[$issue.key] $issue.summary
$issue.assignee - $issue.type - $issue.fixVersions
$issue.link
#end
#elseif ( $issues.size() < 50 )
#foreach( $issue in $issues )
[$issue.key] $issue.summary
$issue.link
#end
#else
#foreach( $issue in $issues )
$date.format($issue.created) - $issue.link
#end
#end