com.atlassian.greenhopper.service.charts
Class HourBurndownChartServiceImpl

java.lang.Object
  extended by com.atlassian.greenhopper.service.charts.HourBurndownChartServiceImpl
All Implemented Interfaces:
HourBurndownChartService

@Service(value="gh-hourBurndownChartService")
public class HourBurndownChartServiceImpl
extends java.lang.Object
implements HourBurndownChartService


Field Summary
 
Fields inherited from interface com.atlassian.greenhopper.service.charts.HourBurndownChartService
SERVICE
 
Constructor Summary
HourBurndownChartServiceImpl()
           
 
Method Summary
 HourBurndownModel getAggregatedHourBurndown(GHVersion iteration, com.opensymphony.user.User user, ChartBoard board)
          Build the HourBurndownModel for a parent iteration.
 HourBurndownModel getAggregatedHourBurndown(com.opensymphony.user.User user, HourBurndownSpan span, HourBurndownSpanMapper spanMapper)
          Apply the algo for the aggregated hour burndown.
 HourBurndownModel getHourBurndown(java.util.List<com.atlassian.jira.issue.Issue> issues, com.opensymphony.user.User user, org.joda.time.DateMidnight startDate, org.joda.time.DateMidnight endDate)
          TODO move projection calculation in here as well
 TimelineAnalysis getHourBurndownAnalysis(java.util.List<com.atlassian.jira.issue.Issue> issues, com.opensymphony.user.User user, org.joda.time.DateMidnight startDate, org.joda.time.DateMidnight endDate)
           
 java.util.Map<java.lang.String,IssueReport> getHourBurndownReport(java.util.List<com.atlassian.jira.issue.Issue> issues, com.opensymphony.user.User user, org.joda.time.DateMidnight startDate, org.joda.time.DateMidnight endDate, ChartContext chartContext)
          The report can't be based on the model, since it contains the raw data on a per-issue-base.
 HourBurndownEntry getInitialValue(com.opensymphony.user.User user, WorklogTimeline timeline, java.util.List<com.atlassian.jira.issue.Issue> issues, org.joda.time.DateMidnight startDate)
           
 HourBurndownEntry getInitialValue(com.opensymphony.user.User user, WorklogTimeline timeline, java.util.List<com.atlassian.jira.issue.Issue> issues, org.joda.time.DateMidnight startDate, TimelineAnalysis analysis)
          Compute the initial value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HourBurndownChartServiceImpl

public HourBurndownChartServiceImpl()
Method Detail

getHourBurndown

public HourBurndownModel getHourBurndown(java.util.List<com.atlassian.jira.issue.Issue> issues,
                                         com.opensymphony.user.User user,
                                         org.joda.time.DateMidnight startDate,
                                         org.joda.time.DateMidnight endDate)
TODO move projection calculation in here as well

Specified by:
getHourBurndown in interface HourBurndownChartService
Parameters:
issues - : The issues to build the chart model for. This can be a list of all issues in an iteration, or a filtered list.
startDate - : The start date of the iteration, or null if not known
endDate - : The end date of the iteration, or null if not known
Returns:
Model with aggregated data by day.

getHourBurndownAnalysis

public TimelineAnalysis getHourBurndownAnalysis(java.util.List<com.atlassian.jira.issue.Issue> issues,
                                                com.opensymphony.user.User user,
                                                org.joda.time.DateMidnight startDate,
                                                org.joda.time.DateMidnight endDate)
Specified by:
getHourBurndownAnalysis in interface HourBurndownChartService

getHourBurndownReport

public java.util.Map<java.lang.String,IssueReport> getHourBurndownReport(java.util.List<com.atlassian.jira.issue.Issue> issues,
                                                                         com.opensymphony.user.User user,
                                                                         org.joda.time.DateMidnight startDate,
                                                                         org.joda.time.DateMidnight endDate,
                                                                         ChartContext chartContext)
The report can't be based on the model, since it contains the raw data on a per-issue-base.

Specified by:
getHourBurndownReport in interface HourBurndownChartService
Parameters:
issues - : The issues to build the report for
startDate - : The start date of the iteration, or null if not known
endDate - : The end date of the iteration, or null if not known

getAggregatedHourBurndown

public HourBurndownModel getAggregatedHourBurndown(GHVersion iteration,
                                                   com.opensymphony.user.User user,
                                                   ChartBoard board)
Description copied from interface: HourBurndownChartService
Build the HourBurndownModel for a parent iteration. The aggregate model will collect the initial values of all subiterations as it's own initial value. This means that as soon as issues get estimated in subiterations, the remaining estimate will be added to the aggregate model and to the guideline as well. Time spent and estimate changes will be factored in on these aggregated lines on the days they occur.

Specified by:
getAggregatedHourBurndown in interface HourBurndownChartService
Parameters:
iteration - : The parent iteration
user - : The current user
Returns:
Model with aggregated data by day and sub-iterations

getAggregatedHourBurndown

public HourBurndownModel getAggregatedHourBurndown(com.opensymphony.user.User user,
                                                   HourBurndownSpan span,
                                                   HourBurndownSpanMapper spanMapper)
Apply the algo for the aggregated hour burndown. This chart shows the aggregated data of all child versions, starting with the sum of all initial values. Consecutive work done is subtracted the day it became effective. In practice, this means that unlike the regular hour burndown charts, the initial value for this one changes over time, when the child versions become estimated. TODO ChartBoard is used as a refactoring boundary here
TODO Needs test coverage once refactoring is done TODO !!! WARNING !!! The context needs to be forced in the ChartBoard for now else the ChartBoard default context will be applied.

Specified by:
getAggregatedHourBurndown in interface HourBurndownChartService

getInitialValue

public HourBurndownEntry getInitialValue(com.opensymphony.user.User user,
                                         WorklogTimeline timeline,
                                         java.util.List<com.atlassian.jira.issue.Issue> issues,
                                         org.joda.time.DateMidnight startDate)
Specified by:
getInitialValue in interface HourBurndownChartService

getInitialValue

public HourBurndownEntry getInitialValue(com.opensymphony.user.User user,
                                         WorklogTimeline timeline,
                                         java.util.List<com.atlassian.jira.issue.Issue> issues,
                                         org.joda.time.DateMidnight startDate,
                                         TimelineAnalysis analysis)
Compute the initial value.

Specified by:
getInitialValue in interface HourBurndownChartService


Copyright © 2007-2011 Atlassian. All Rights Reserved.