internal void ProcessWorklog(JiraIssue issue, string timeSpent, TimeEstimateRecalcualationMethod method, string newTimeEstimate) { var remoteWorklog = new RemoteWorklog(); remoteWorklog.comment = "Time logged"; remoteWorklog.timeSpent = timeSpent; remoteWorklog.startDate = new DateTime(); switch (method) { case TimeEstimateRecalcualationMethod.AdjustAutomatically: _service.addWorklogAndAutoAdjustRemainingEstimateFixed(_token, issue.DisplayId, remoteWorklog); break; case TimeEstimateRecalcualationMethod.DoNotChange: _service.addWorklogAndRetainRemainingEstimateFixed(_token, issue.DisplayId, remoteWorklog); break; case TimeEstimateRecalcualationMethod.SetToNewValue: _service.addWorklogWithNewRemainingEstimateFixed(_token, issue.DisplayId, remoteWorklog, newTimeEstimate); break; default: throw new ArgumentOutOfRangeException("ProcessWorklog"); } }