Class DaysInColumnCallback
java.lang.Object
com.atlassian.greenhopper.service.charts.AbstractIssueHistoryStatusCallback
com.atlassian.greenhopper.web.rapid.list.DaysInColumnCallback
- All Implemented Interfaces:
ChangeHistoryCallback<com.atlassian.jira.issue.status.Status>
,IssueStatusHistoryCallback
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.
- Author:
- ahennecke
-
Field Summary
Fields inherited from class com.atlassian.greenhopper.service.charts.AbstractIssueHistoryStatusCallback
log
-
Constructor Summary
ConstructorsConstructorDescriptionDaysInColumnCallback
(Map<Long, RapidIssueEntry> issues, Map<com.atlassian.jira.issue.status.Status, Column> columnsByStatus, List<com.atlassian.jira.issue.status.Status> statuses, com.atlassian.jira.config.ConstantsManager constantsManager) -
Method Summary
Modifier and TypeMethodDescriptionvoid
after
(com.atlassian.jira.issue.status.Status status) We're done with one status, all changes to and from have been collected.void
changedFrom
(Long issueId, 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
changedTo
(Long issueId, String issueKey, org.joda.time.DateTime changeTime, com.atlassian.jira.issue.status.Status changedToStatus) Same like above, but for changes into the columnCollection<com.atlassian.jira.issue.status.Status>
Methods inherited from class com.atlassian.greenhopper.service.charts.AbstractIssueHistoryStatusCallback
before
-
Constructor Details
-
DaysInColumnCallback
-
-
Method Details
-
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.
-
changedFrom
public void changedFrom(Long issueId, 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:
changedFrom
in interfaceChangeHistoryCallback<com.atlassian.jira.issue.status.Status>
- Overrides:
changedFrom
in classAbstractIssueHistoryStatusCallback
changeTime
- : time when the change was performed, in UTCchangedFromStatus
- : the old value the issue has changed from (e.g. old status or version ID)
-
changedTo
public void changedTo(Long issueId, 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:
changedTo
in interfaceChangeHistoryCallback<com.atlassian.jira.issue.status.Status>
- Overrides:
changedTo
in classAbstractIssueHistoryStatusCallback
changeTime
- : time when the change was performed, in UTCchangedToStatus
- : the new value (e.g. Status or fix version ID) the issue has changed to
-
after
public void after(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:
after
in interfaceChangeHistoryCallback<com.atlassian.jira.issue.status.Status>
- Overrides:
after
in classAbstractIssueHistoryStatusCallback
-