Class WorklogInputBuilder

java.lang.Object
com.atlassian.jira.rest.client.api.domain.input.WorklogInputBuilder

public class WorklogInputBuilder extends Object
Builder class for WorklogInput. Allows to create new worklogInput instance by using convenient setters. Especially useful are methods to set estimate adjustment options: setAdjustEstimateAuto(), setAdjustEstimateLeave(), setAdjustEstimateManual(String) and setAdjustEstimateNew(String).

If you want ot create new WorklogInput from existing Worklog entity then use copyFromWorklog(com.atlassian.jira.rest.client.api.domain.Worklog) method.

  • Field Details

  • Constructor Details

    • WorklogInputBuilder

      public WorklogInputBuilder(URI issueUri)
  • Method Details

    • copyFromWorklog

      public WorklogInputBuilder copyFromWorklog(Worklog worklog)
    • setAdjustEstimateNew

      public WorklogInputBuilder setAdjustEstimateNew(String newEstimate)
      Sets AdjustEstimate to NEW - sets estimate to specified value.
      Parameters:
      newEstimate - new estimate value to set.
      You can specify a time unit after a time value 'X', such as Xw, Xd, Xh or Xm, to represent weeks (w), days (d), hours (h) and minutes (m), respectively.
      If you do not specify a time unit, minute will be assumed.
      Returns:
      this worklog input builder object
    • setAdjustEstimateNew

      public WorklogInputBuilder setAdjustEstimateNew(int newEstimateMinutes)
      Sets AdjustEstimate to NEW - sets estimate to specified value.
      Parameters:
      newEstimateMinutes - new estimate value to set, in minutes.
      Returns:
      this worklog input builder object
    • setAdjustEstimateLeave

      public WorklogInputBuilder setAdjustEstimateLeave()
      Sets AdjustEstimate to LEAVE - leaves estimate as is.
      Returns:
      this worklog input builder object
    • setAdjustEstimateManual

      public WorklogInputBuilder setAdjustEstimateManual(String reduceEstimateBy)
      Sets AdjustEstimate to MANUAL - reduces remaining estimate by given value.
      Parameters:
      reduceEstimateBy - the amount to reduce the remaining estimate by
      You can specify a time unit after a time value 'X', such as Xw, Xd, Xh or Xm, to represent weeks (w), days (d), hours (h) and minutes (m), respectively.
      If you do not specify a time unit, minute will be assumed.
      Returns:
      this worklog input builder object
    • setAdjustEstimateManual

      public WorklogInputBuilder setAdjustEstimateManual(int reduceEstimateByMinutes)
      Sets AdjustEstimate to MANUAL - reduces remaining estimate by given value.
      Parameters:
      reduceEstimateByMinutes - the amount to reduce the remaining estimate by, in minutes.
      Returns:
      this worklog input builder object
    • setAdjustEstimateAuto

      public WorklogInputBuilder setAdjustEstimateAuto()
      Sets AdjustEstimate to AUTO - will automatically adjust the value based on the minutes spend specified on the worklog input.

      This is the default option.

      Returns:
      this worklog input builder object
    • setSelf

      public WorklogInputBuilder setSelf(URI self)
    • setIssueUri

      public WorklogInputBuilder setIssueUri(URI issueUri)
    • setAuthor

      public WorklogInputBuilder setAuthor(BasicUser author)
    • setUpdateAuthor

      public WorklogInputBuilder setUpdateAuthor(BasicUser updateAuthor)
    • setComment

      public WorklogInputBuilder setComment(String comment)
    • setStartDate

      public WorklogInputBuilder setStartDate(org.joda.time.DateTime startDate)
    • setMinutesSpent

      public WorklogInputBuilder setMinutesSpent(int minutesSpent)
    • setVisibility

      public WorklogInputBuilder setVisibility(Visibility visibility)
    • build

      public WorklogInput build()