public async Task <bool> LogWork(string issueID, IWorkLog workLog) { var result = await _baseController.LogWork(issueID, workLog); if (!result) { return(false); } ResetIssueTimer(issueID); SaveList(); return(true); }
public async Task <bool> LogWork(string issueID, IWorkLog workLog) { if (_clientStore.Client == null) { throw new InvalidOperationException("Client is null"); } var issue = _list.GetIssueByID(issueID); if (issue.Issue?.Key == null) { throw new InvalidOperationException("Issue key is null"); } return(await _clientStore.Client.LogWork(issue.Issue.Key, workLog)); }
public async Task <bool> LogWork(string issueKey, IWorkLog workLog) { LastOperationResult = null; var jiraWorkLog = new Worklog(workLog.TimeSpent, workLog.StartTime, workLog.Comment); try { await _client.Issues.AddWorklogAsync(issueKey, jiraWorkLog, GetJiraWorkLogStrategy(workLog.Strategy), workLog.NewEstimate); } catch (Exception e) { LastOperationResult = e.Message; return(false); } return(true); }