@Override public Worklog validateAndPerformAndManualAdjustEstimate(JiraServiceContext serviceContext, Issue issue, WorklogInputParameters worklogInputParameters) { WorklogAdjustmentAmountResult worklogResult = getWorklogService().validateCreateWithManuallyAdjustedEstimate(serviceContext, (WorklogAdjustmentAmountInputParameters) worklogInputParameters); return getWorklogService().createWithManuallyAdjustedEstimate(serviceContext, worklogResult, true); }
worklog = worklogService.createWithManuallyAdjustedEstimate(getJiraServiceContext(), (WorklogAdjustmentAmountResult) worklogResult, true);
public void createValue(Issue issue, WorklogValue value) { final WorklogResult worklogResult = value.worklogResult(); // note that we don't expect this to be actually used but we need to pass it anyway final JiraServiceContext jiraServiceContext = new JiraServiceContextImpl(authenticationContext.getUser()); // Based on how the user wants to update the remaining estimate we will call the correct do method on the service switch (value.adjustEstimate()) { case LEAVE: getWorklogService().createAndRetainRemainingEstimate(jiraServiceContext, worklogResult, true); break; case NEW: getWorklogService().createWithNewRemainingEstimate(jiraServiceContext, (WorklogNewEstimateResult) worklogResult, true); break; case MANUAL: getWorklogService().createWithManuallyAdjustedEstimate(jiraServiceContext, (WorklogAdjustmentAmountResult) worklogResult, true); break; default : getWorklogService().createAndAutoAdjustRemainingEstimate(jiraServiceContext, worklogResult, true); } }