Codota Logo
com.atlassian.jira.bc.issue.worklog
Code IndexAdd Codota to your IDE (free)

How to use com.atlassian.jira.bc.issue.worklog

Best Java code snippets using com.atlassian.jira.bc.issue.worklog (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Gson g =
  • Codota Iconnew Gson()
  • Codota IconGsonBuilder gsonBuilder;gsonBuilder.create()
  • Codota Iconnew GsonBuilder().create()
  • Smart code suggestions by Codota
}
origin: com.atlassian.jira/jira-core

@Override
public WorklogNewEstimateResult validateCreateWithNewEstimate(JiraServiceContext jiraServiceContext, WorklogNewEstimateInputParameters params)
{
  WorklogResult worklogResult = validateCreate(jiraServiceContext, params);
  if (isValidNewEstimate(jiraServiceContext, params.getNewEstimate(), params.getErrorFieldPrefix()) && worklogResult != null)
  {
    final Long estimate = (params.getNewEstimate() == null) ? null : getDurationForFormattedString(params.getNewEstimate(), jiraServiceContext);
    return WorklogResultFactory.createNewEstimate(worklogResult, estimate);
  }
  return null;
}
origin: com.atlassian.jira/jira-core

@Override
public WorklogAdjustmentAmountResult validateCreateWithManuallyAdjustedEstimate(JiraServiceContext jiraServiceContext, WorklogAdjustmentAmountInputParameters params)
{
  WorklogResult worklogResult = validateCreate(jiraServiceContext, params);
  if (isValidAdjustmentAmount(jiraServiceContext, params.getAdjustmentAmount(), params.getErrorFieldPrefix()) && worklogResult != null)
  {
    return WorklogResultFactory.createAdjustmentAmount(worklogResult, getDurationForFormattedString(params.getAdjustmentAmount(), jiraServiceContext));
  }
  return null;
}
origin: com.atlassian.jira/jira-rest-plugin

@Override
public Worklog validateAndPerformAndSetNewEstimate(JiraServiceContext serviceContext, Issue issue, WorklogInputParameters worklogInputParameters)
{
  WorklogNewEstimateResult worklogResult = getWorklogService().validateDeleteWithNewEstimate(serviceContext, worklogInputParameters.getWorklogId(), ((WorklogNewEstimateInputParameters) worklogInputParameters).getNewEstimate());
  boolean success = getWorklogService().deleteWithNewRemainingEstimate(serviceContext, worklogResult, true);
  return success ? worklogResult.getWorklog() : null;
}
origin: com.atlassian.jira/jira-rest-plugin

@Override
public Worklog validateAndPerformAndAutoAdjustEstimate(JiraServiceContext serviceContext, Issue issue, WorklogInputParameters worklogInputParameters)
{
  WorklogResult worklogResult = getWorklogService().validateDelete(serviceContext, worklogInputParameters.getWorklogId());
  boolean success = getWorklogService().deleteAndAutoAdjustRemainingEstimate(serviceContext, worklogResult, true);
  return success ? worklogResult.getWorklog() : null;
}
origin: com.atlassian.jira/jira-rest-plugin

@Override
public Worklog validateAndPerformAndLeaveEstimate(JiraServiceContext serviceContext, Issue issue, WorklogInputParameters worklogInputParameters)
{
  WorklogResult worklogResult = getWorklogService().validateDelete(serviceContext, worklogInputParameters.getWorklogId());
  boolean success = getWorklogService().deleteAndRetainRemainingEstimate(serviceContext, worklogResult, true);
  return success ? worklogResult.getWorklog() : null;
}
origin: com.atlassian.jira/jira-rest-plugin

@Override
public Worklog validateAndPerformAndManualAdjustEstimate(JiraServiceContext serviceContext, Issue issue, WorklogInputParameters worklogInputParameters)
{
  WorklogAdjustmentAmountResult worklogResult = getWorklogService().validateDeleteWithManuallyAdjustedEstimate(serviceContext, worklogInputParameters.getWorklogId(), ((WorklogAdjustmentAmountInputParameters) worklogInputParameters).getAdjustmentAmount());
  boolean success = getWorklogService().deleteWithManuallyAdjustedEstimate(serviceContext, worklogResult, true);
  return success ? worklogResult.getWorklog() : null;
}
origin: com.atlassian.jira/jira-core

@Override
public WorklogNewEstimateResult validateUpdateWithNewEstimate(JiraServiceContext jiraServiceContext, final WorklogNewEstimateInputParameters params)
{
  notNull("params", params);
  WorklogResult worklogResult = validateUpdate(jiraServiceContext, params);
  if (isValidNewEstimate(jiraServiceContext, params.getNewEstimate(), params.getErrorFieldPrefix()) && worklogResult != null)
  {
    final Long estimate = (params.getNewEstimate() == null) ? null : getDurationForFormattedString(params.getNewEstimate(), jiraServiceContext);
    return WorklogResultFactory.createNewEstimate(worklogResult, estimate);
  }
  return null;
}
origin: com.atlassian.jira/jira-api

/**
 * @param timeSpent the amount of time spent
 * @return a Builder with the time spent pre-populated
 */
public static Builder timeSpent(final String timeSpent)
{
  return new Builder().timeSpent(timeSpent);
}
origin: com.atlassian.jira/jira-core

@Override
public WorklogAdjustmentAmountResult validateDeleteWithManuallyAdjustedEstimate(JiraServiceContext jiraServiceContext, Long worklogId, String adjustmentAmount)
{
  WorklogResult originalWorklogResult = validateDelete(jiraServiceContext, worklogId);
  if (originalWorklogResult != null && isValidAdjustmentAmount(jiraServiceContext, adjustmentAmount))
  {
    return WorklogResultFactory.createAdjustmentAmount(originalWorklogResult, getDurationForFormattedString(adjustmentAmount, jiraServiceContext));
  }
  return null;
}
origin: com.atlassian.jira/jira-core

@Override
public WorklogNewEstimateResult validateDeleteWithNewEstimate(JiraServiceContext jiraServiceContext, Long worklogId, String newEstimate)
{
  WorklogResult originalWorklogResult = validateDelete(jiraServiceContext, worklogId);
  if (originalWorklogResult != null && isValidNewEstimate(jiraServiceContext, newEstimate))
  {
    final Long estimate = (newEstimate == null) ? null : getDurationForFormattedString(newEstimate, jiraServiceContext);
    return WorklogResultFactory.createNewEstimate(originalWorklogResult, estimate);
  }
  return null;
}
origin: com.atlassian.jira/jira-api

/**
 * Use this method to build the {@link WorklogNewEstimateInputParameters} object required for the "new estimate"
 * service calls.
 *
 * @return a {@link WorklogNewEstimateInputParameters} object with the built parameters.
 */
public WorklogNewEstimateInputParameters buildNewEstimate()
{
  return new WorklogInputParametersImpl(worklogId, issue, timeSpent, startDate, comment, groupLevel, roleLevelId,
      getVisibility(), newEstimate, null, editableCheckRequired, errorFieldPrefix);
}
origin: com.atlassian.jira/jira-core

@Override
public Worklog updateWithNewRemainingEstimate(JiraServiceContext jiraServiceContext, WorklogNewEstimateResult worklogResult, boolean dispatchEvent)
{
  return update(jiraServiceContext, worklogResult, worklogResult.getNewEstimate(), dispatchEvent);
}
origin: com.atlassian.jira/jira-core

@Override
public Worklog createWithNewRemainingEstimate(JiraServiceContext jiraServiceContext, WorklogNewEstimateResult worklogResult, boolean dispatchEvent)
{
  return create(jiraServiceContext, worklogResult, worklogResult.getNewEstimate(), dispatchEvent);
}
origin: com.atlassian.jira/jira-core

@Override
public boolean deleteWithNewRemainingEstimate(JiraServiceContext jiraServiceContext, WorklogNewEstimateResult worklogNewEstimate, boolean dispatchEvent)
{
  return delete(jiraServiceContext, worklogNewEstimate, worklogNewEstimate.getNewEstimate(), dispatchEvent);
}
origin: com.atlassian.jira/jira-api

/**
 * Used for creating {@link WorklogResult} objects that also capture a <code>newEstimate</code> to be set.
 *
 * @param worklog the worklog
 * @param newEstimate the new estimate in seconds
 * @return Creates a {@link WorklogResult} that contains the {@link Worklog} and the new estimate. The editable check will be required.
 */
public static WorklogNewEstimateResult createNewEstimate(final Worklog worklog, final Long newEstimate)
{
  return createNewEstimate(worklog, newEstimate, true);
}
origin: com.atlassian.jira/jira-api

/**
 * Used for creating {@link WorklogResult} objects that also capture a <code>adjustmentAmount</code> to be set.
 *
 * @param worklog the worklog
 * @param adjustmentAmount the adjustment amount in seconds
 * @return Creates a {@link WorklogResult} that contains the {@link Worklog} and the adjustment amount. The editable check will be required.
 */
public static WorklogAdjustmentAmountResult createAdjustmentAmount(final Worklog worklog, final Long adjustmentAmount)
{
  return createAdjustmentAmount(worklog, adjustmentAmount, true);
}
origin: com.atlassian.jira/jira-api

/**
 * Used for creating {@link WorklogResult} objects that also capture a <code>newEstimate</code> to be set.
 *
 * @param worklog the worklog
 * @param newEstimate the new estimate in seconds
 * @param isEditableCheckRequired flag to set on the result
 * @return Creates a {@link WorklogResult} that contains the {@link Worklog}, the new estimate and the flag for the editable check.
 */
public static WorklogNewEstimateResult createNewEstimate(final Worklog worklog, final Long newEstimate, final boolean isEditableCheckRequired)
{
  return new WorklogResultImpl(worklog, isEditableCheckRequired, newEstimate, null);
}
origin: com.atlassian.jira/jira-api

/**
 * Use this method to build the base {@link WorklogInputParameters} object.
 *
 * @return a {@link WorklogInputParameters} object with the built parameters.
 */
public WorklogInputParameters build()
{
  return new WorklogInputParametersImpl(worklogId, issue, timeSpent, startDate, comment, groupLevel, roleLevelId,
      getVisibility(), null, null, editableCheckRequired, errorFieldPrefix);
}
origin: com.atlassian.jira/jira-api

/**
 * Will build the {@link WorklogInputParameters} object and pass in every variable independent of which
 * adjustment option you have picked.
 *
 * @return a {@link WorklogInputParameters} object with the built parameters.
 */
public WorklogInputParameters buildAll()
{
  return new WorklogInputParametersImpl(worklogId, issue, timeSpent, startDate, comment, groupLevel, roleLevelId,
      getVisibility(), newEstimate, adjustmentAmount, editableCheckRequired, errorFieldPrefix);
}
origin: com.atlassian.jira/jira-api

/**
 * Use this method to build the {@link WorklogAdjustmentAmountInputParameters} object required for the
 * "manual adjustment" (or "adjustment amount") service calls.
 *
 * @return a {@link WorklogAdjustmentAmountInputParameters} object with the built parameters.
 */
public WorklogAdjustmentAmountInputParameters buildAdjustmentAmount()
{
  return new WorklogInputParametersImpl(worklogId, issue, timeSpent, startDate, comment, groupLevel, roleLevelId,
      getVisibility(), null, adjustmentAmount, editableCheckRequired, errorFieldPrefix);
}
com.atlassian.jira.bc.issue.worklog

Most used classes

  • WorklogService
    This is the business layer component that must be used to access all com.atlassian.jira.bc.issue.wor
  • TimeTrackingConfiguration
  • WorklogInputParametersImpl$Builder
    A fluent-style Builder for constructing WorklogInputParameters, WorklogNewEstimateInputParameters an
  • WorklogInputParametersImpl
    Implementation of the WorklogInputParameters, WorklogNewEstimateInputParameters and WorklogAdjustmen
  • WorklogResult
    An interface which defines the base result of a WorklogService validation call. This interface has t
  • WorklogAdjustmentAmountResult,
  • WorklogChangedSincePage,
  • WorklogInputParameters,
  • WorklogNewEstimateInputParameters,
  • WorklogNewEstimateResult,
  • WorklogResultFactory,
  • DefaultWorklogService,
  • DeletedWorklog,
  • TimeTrackingConfiguration$Mode,
  • TimeTrackingConfiguration$TimeFormat,
  • WorklogResultFactory$WorklogResultImpl
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now