public class

AggregateTimeTrackingBean

extends Object
java.lang.Object
   ↳ com.atlassian.jira.issue.util.AggregateTimeTrackingBean

Class Overview

Bean to store values of Time Tracking Aggregate values. It is more efficient to calculate them all at the same time (looping only once), and an instance of this is returned.

Summary

Constants
String AGG_TIMETRACKING
Public Constructors
AggregateTimeTrackingBean(Long originalEstimate, Long remainingEstimate, Long timeSpent, int subtaskCount)
Public Methods
static Long addAndPreserveNull(Long estValue, Long origValue)
Method to calculate the addition of two Longs, while preserving null if they are both null.
void bumpGreatestSubTaskEstimate(Long originalEstimate, Long remainingEstimate, Long timeSpent)
When this is called, the current values of the bean are used to work out the the greatest sub task estimate.
Long getGreastestSubTaskEstimate()
This property is used to track the largest sub task estimate encountered so far.
Long getOriginalEstimate()
Long getRemainingEstimate()
int getSubTaskCount()
static Long getTheGreaterOfEstimates(Long originalEstimate, Long remainingEstimate, Long timeSpent)
Finds the greater of the original estimate OR the remaining estimate plus the time spent.
Long getTimeSpent()
void setGreastestSubTaskEstimate(Long greastestSubTaskEstimate)
void setOriginalEstimate(Long originalEstimate)
void setRemainingEstimate(Long remainingEstimate)
void setSubTaskCount(int subtaskCount)
void setTimeSpent(Long timeSpent)
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String AGG_TIMETRACKING

Constant Value: "atl.jira.timetracking.aggregate.bean."

Public Constructors

public AggregateTimeTrackingBean (Long originalEstimate, Long remainingEstimate, Long timeSpent, int subtaskCount)

Public Methods

public static Long addAndPreserveNull (Long estValue, Long origValue)

Method to calculate the addition of two Longs, while preserving null if they are both null.

Parameters
estValue value from issue
origValue value from bean
Returns
  • new Long based on the addition of the params.

public void bumpGreatestSubTaskEstimate (Long originalEstimate, Long remainingEstimate, Long timeSpent)

When this is called, the current values of the bean are used to work out the the greatest sub task estimate. TimeSpent is added to remainingEstimate and comapred to teh originalEstimate. The larger is then compared with the beans current greatest estimate and replaces it if greater.

Parameters
originalEstimate an issue's original estimate
remainingEstimate an issue's remaining estimate
timeSpent an issue time spent

public Long getGreastestSubTaskEstimate ()

This property is used to track the largest sub task estimate encountered so far. Need to help the UI work out how big things should be when it is called piece meal to render the UI. It

Returns
  • a Long value which is the greater of the original estimate OR the remaining estimate plus the time spent.

public Long getOriginalEstimate ()

public Long getRemainingEstimate ()

public int getSubTaskCount ()

public static Long getTheGreaterOfEstimates (Long originalEstimate, Long remainingEstimate, Long timeSpent)

Finds the greater of the original estimate OR the remaining estimate plus the time spent.

Parameters
originalEstimate original estimate
remainingEstimate remaining estimate
timeSpent the time spent
Returns
  • the greater of the original estimate OR the remaining estimate plus the time spent.

public Long getTimeSpent ()

public void setGreastestSubTaskEstimate (Long greastestSubTaskEstimate)

public void setOriginalEstimate (Long originalEstimate)

public void setRemainingEstimate (Long remainingEstimate)

public void setSubTaskCount (int subtaskCount)

public void setTimeSpent (Long timeSpent)