com.atlassian.greenhopper.web.rapid.list
Class DaysInColumnCallback
java.lang.Object
com.atlassian.greenhopper.global.AbstractLoggable
com.atlassian.greenhopper.service.charts.AbstractIssueHistoryStatusCallback
com.atlassian.greenhopper.web.rapid.list.DaysInColumnCallback
- All Implemented Interfaces:
- IssueStatusHistoryCallback
public class DaysInColumnCallback
- extends AbstractIssueHistoryStatusCallback
Collector to find out the total time an issue spent in the column it's currently in.
The idea works like this: The query defines which issues we're looking into. We're sending that off to the history index, and collect the change
history for every status. Then we aggregate the time spent per issue and fill it into the REST template.
TODO rewrite everything using issueKeys? more readable
- Author:
- ahennecke
|
Constructor Summary |
DaysInColumnCallback(java.util.Map<java.lang.Long,RapidIssueEntry> issues,
java.util.Map<com.atlassian.jira.issue.status.Status,Column> columnsByStatus,
java.util.List<com.atlassian.jira.issue.status.Status> statuses)
|
|
Method Summary |
void |
afterStatus(com.atlassian.jira.issue.status.Status status)
We're done with one status, all changes to and from have been collected. |
org.joda.time.DateTime |
getNow()
|
java.util.Collection<com.atlassian.jira.issue.status.Status> |
getStatuses()
|
void |
statusChangedFrom(java.lang.Long issueId,
java.lang.String issueKey,
org.joda.time.DateTime changeTime,
com.atlassian.jira.issue.status.Status changedFromStatus)
Pick up changes from a status that's in the same column like the current issue status. |
void |
statusChangedTo(java.lang.Long issueId,
java.lang.String issueKey,
org.joda.time.DateTime changeTime,
com.atlassian.jira.issue.status.Status changedToStatus)
Same like above, but for changes into the column |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DaysInColumnCallback
public DaysInColumnCallback(java.util.Map<java.lang.Long,RapidIssueEntry> issues,
java.util.Map<com.atlassian.jira.issue.status.Status,Column> columnsByStatus,
java.util.List<com.atlassian.jira.issue.status.Status> statuses)
getStatuses
public java.util.Collection<com.atlassian.jira.issue.status.Status> getStatuses()
- Returns:
- The statuses to query for. Callbacks will be for each status in the collection, for all issues according to getQuery(), in the order of
the collection.
statusChangedFrom
public void statusChangedFrom(java.lang.Long issueId,
java.lang.String issueKey,
org.joda.time.DateTime changeTime,
com.atlassian.jira.issue.status.Status changedFromStatus)
- Pick up changes from a status that's in the same column like the current issue status. These are the only ones we're interested in, all other
status changes just get ignored. We only want to know how long the issue has been in the _current_ column.
- Specified by:
statusChangedFrom in interface IssueStatusHistoryCallback- Overrides:
statusChangedFrom in class AbstractIssueHistoryStatusCallback
changeTime - : time when the change was performed, in UTC
statusChangedTo
public void statusChangedTo(java.lang.Long issueId,
java.lang.String issueKey,
org.joda.time.DateTime changeTime,
com.atlassian.jira.issue.status.Status changedToStatus)
- Same like above, but for changes into the column
- Specified by:
statusChangedTo in interface IssueStatusHistoryCallback- Overrides:
statusChangedTo in class AbstractIssueHistoryStatusCallback
changeTime - : time when the change was performed, in UTCchangedToStatus - : the status the issue has changed to
afterStatus
public void afterStatus(com.atlassian.jira.issue.status.Status status)
- We're done with one status, all changes to and from have been collected. Now we want "time in column", not "time in status", but that's just an
additive. Basically, we only have collected data that relates to the current column, which makes things a little easier.
- Specified by:
afterStatus in interface IssueStatusHistoryCallback- Overrides:
afterStatus in class AbstractIssueHistoryStatusCallback
getNow
public org.joda.time.DateTime getNow()
Copyright © 2007-2012 Atlassian. All Rights Reserved.