Class TimeTrackingServiceImpl

java.lang.Object
com.atlassian.greenhopper.service.timetracking.TimeTrackingServiceImpl
All Implemented Interfaces:
TimeTrackingService

@Service public class TimeTrackingServiceImpl extends Object implements TimeTrackingService
  • Constructor Details

    • TimeTrackingServiceImpl

      public TimeTrackingServiceImpl()
  • Method Details

    • updateRemainingEstimate

      @Nonnull public ServiceResult updateRemainingEstimate(com.atlassian.jira.issue.Issue issue, String duration)
      Description copied from interface: TimeTrackingService
      Updates the remaining estimate of an issue. This will fire the Issue Updated event as well as send out an email due to the update.
      Specified by:
      updateRemainingEstimate in interface TimeTrackingService
      Parameters:
      issue - the issue to update
      duration - the duration to set
      Returns:
      the outcome; potentially with errors
    • updateRemainingEstimate

      public ServiceResult updateRemainingEstimate(com.atlassian.jira.issue.Issue issue, String duration, boolean updateOriginalEstimateIfNotSet)
      Description copied from interface: TimeTrackingService
      Updates the remaining estimate of an issue. This will fire the Issue Updated event as well as send out an email due to the update.

      Optionally, this can also update the original estimate of the issue to be the same duration, if no value has yet been set on it.

      Specified by:
      updateRemainingEstimate in interface TimeTrackingService
      Parameters:
      issue - the issue to update
      duration - the duration to set
      updateOriginalEstimateIfNotSet - whether or not to update the original estimate as well if its not set (to emulate JIRA's behaviour)
      Returns:
      the outcome; potentially with errors
    • updateOriginalEstimate

      @Nonnull public ServiceResult updateOriginalEstimate(com.atlassian.jira.issue.Issue issue, String duration)
      Description copied from interface: TimeTrackingService
      Updates the original estimate of an issue. This will fire the Issue Updated event as well as send out an email due to the update.
      Specified by:
      updateOriginalEstimate in interface TimeTrackingService
      Parameters:
      issue - the issue to update
      duration - the duration to set
      Returns:
      the outcome; potentially with errors
    • updateOriginalEstimate

      @Nonnull public ServiceResult updateOriginalEstimate(com.atlassian.jira.issue.Issue issue, String duration, boolean updateRemainingEstimateIfNotSet)
      Description copied from interface: TimeTrackingService
      Updates the original estimate of an issue. This will fire the Issue Updated event as well as send out an email due to the update.

      Optionally, this can also update the remaining estimate of the issue to be the same duration, if no value has yet been set on it.

      Specified by:
      updateOriginalEstimate in interface TimeTrackingService
      Parameters:
      issue - the issue to update
      duration - the duration to set
      updateRemainingEstimateIfNotSet - whether or not to update the remaining estimate as well if it is not set (to emulate JIRA's behaviour)
      Returns:
      the outcome; potentially with errors
    • getAggregates

      public com.atlassian.jira.issue.util.AggregateTimeTrackingBean getAggregates(com.atlassian.jira.issue.Issue issue, Collection<com.atlassian.jira.issue.Issue> subTasks)
      Copied from IssueImplAggregateTimeTrackingCalculator.getAggregates(com.atlassian.jira.issue.Issue).

      Creates and returns a bean that contains all aggregate time tracking information for given issue(not a sub-task). This information is gathered from all issue's sub-tasks that a user in this context has permission to see.

      Specified by:
      getAggregates in interface TimeTrackingService
      Parameters:
      issue - issue to calculate aggregates for.
      Returns:
      The bean containing all aggregate values.