@Override public Worklog validateAndPerformAndSetNewEstimate(JiraServiceContext serviceContext, Issue issue, WorklogInputParameters worklogInputParameters) { WorklogNewEstimateResult worklogResult = getWorklogService().validateCreateWithNewEstimate(serviceContext, (WorklogNewEstimateInputParameters) worklogInputParameters); return getWorklogService().createWithNewRemainingEstimate(serviceContext, worklogResult, true); }
worklog = worklogService.createWithNewRemainingEstimate(getJiraServiceContext(), (WorklogNewEstimateResult) 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); } }
Worklog createdWorklog = worklogService.createWithNewRemainingEstimate(serviceContext, worklogResult, true); checkAndThrowRemoteException(serviceContext.getErrorCollection()); return RemoteWorklogImpl.copyToRemoteWorkLog(createdWorklog, getJiraDurationUtils());