Class DaysInColumnCallback

java.lang.Object
com.atlassian.greenhopper.web.rapid.list.callback.DaysInColumnCallback
All Implemented Interfaces:
IssueStatusHistoryCallback

public class DaysInColumnCallback extends Object implements 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. processChangeHistory must be called in chronological order based on the changeTime parameter.
Author:
ahennecke
  • Constructor Details

    • DaysInColumnCallback

      public DaysInColumnCallback(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 Details

    • getStatuses

      public Collection<com.atlassian.jira.issue.status.Status> getStatuses()
      Specified by:
      getStatuses in interface IssueStatusHistoryCallback
      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.
    • processChangeHistory

      public void processChangeHistory(Long issueId, String issueKey, org.joda.time.DateTime changeTime, com.atlassian.jira.issue.status.Status valueFrom, com.atlassian.jira.issue.status.Status valueTo)
      Description copied from interface: IssueStatusHistoryCallback
      Called for a change to a given new value. Calls to this method must be made chronologically based on the changeTime parameter.
      Specified by:
      processChangeHistory in interface IssueStatusHistoryCallback
      Parameters:
      changeTime - : time when the change was performed, in UTC
      valueFrom - : the old value the issue has changed from (e.g. old status or version ID)
      valueTo - : the new value (e.g. Status or fix version ID) the issue has changed to