swizzle.swizzle-jirareport.1.4.source-code.opened.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}&created%3Aprevious=-1w&status=1&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 Opened: week of $date
#end
$projectName - $date.as("EEEE, MMMM d, yyyy")
$issues.size() opened in last 7 days
#if ( $issues.size() < 11 )
#foreach( $issue in $issues )
[$issue.key] $issue.summary
- Type: $issue.type
- Reporter: $issue.reporter
- Components: $issue.components
- Affects Versions: $issue.affectsVersions
- $issue.link
#end
#elseif ( $issues.size() < 30 )
#foreach( $issue in $issues )
[$issue.key] $issue.summary
$issue.reporter - $issue.type - $issue.affectsVersions
$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