Compare commits

...
3 Commits
4 changed files with 51 additions and 34 deletions
+1 -1
View File
@@ -1 +1 @@
1.0.42 1.0.45
@@ -144,9 +144,17 @@ namespace JiraTimeBot.JiraIntegration
_log.Trace($"Описание отличается, удаляю worklog: {taskTimeItem.Branch} {workLog.Author} {workLog.CreateDate}: {workLog.TimeSpent}"); _log.Trace($"Описание отличается, удаляю worklog: {taskTimeItem.Branch} {workLog.Author} {workLog.CreateDate}: {workLog.TimeSpent}");
} }
if (!dummy) if (!dummy)
{
try
{ {
issue.DeleteWorklogAsync(workLog, token: cancellationToken); issue.DeleteWorklogAsync(workLog, token: cancellationToken);
} }
catch (Exception ex)
{
_log.Error($"Не могу удалить Worklog по задаче {taskTimeItem.Branch}: {ex.Message}.");
continue;
}
}
hasTodayWorklog = false; hasTodayWorklog = false;
} }
else else
@@ -162,9 +170,17 @@ namespace JiraTimeBot.JiraIntegration
Worklog workLogToAdd = new Worklog(timeSpentJira, date.Value, comment); Worklog workLogToAdd = new Worklog(timeSpentJira, date.Value, comment);
if (!dummy) if (!dummy)
{
try
{ {
workLogToAdd = issue.AddWorklogAsync(workLogToAdd, token: cancellationToken).Result; workLogToAdd = issue.AddWorklogAsync(workLogToAdd, token: cancellationToken).Result;
} }
catch (Exception ex)
{
_log.Error($"Не могу добавить Worklog по задаче {taskTimeItem.Branch}: {ex.Message}.");
continue;
}
}
_log.Trace($"Добавили Worklog для {taskTimeItem.Branch}: {workLogToAdd.Author} {workLogToAdd.CreateDate}: {workLogToAdd.TimeSpent}"); _log.Trace($"Добавили Worklog для {taskTimeItem.Branch}: {workLogToAdd.Author} {workLogToAdd.CreateDate}: {workLogToAdd.TimeSpent}");
} }
} }
+3 -3
View File
@@ -26,6 +26,6 @@ using System.Runtime.InteropServices;
// //
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.42")] [assembly: AssemblyVersion("1.0.45")]
[assembly: AssemblyFileVersion("1.0.42")] [assembly: AssemblyFileVersion("1.0.45")]
[assembly: AssemblyInformationalVersion("1.0.42")] [assembly: AssemblyInformationalVersion("1.0.45")]
+1
View File
@@ -172,6 +172,7 @@ namespace JiraTimeBot.UI
if (txtDummyMode.Checked) if (txtDummyMode.Checked)
{ {
_log.Info("Выключаем режим Тестового прогона"); _log.Info("Выключаем режим Тестового прогона");
txtDummyMode.Checked = false;
} }
using (var tokenSource = GetTokenSource()) using (var tokenSource = GetTokenSource())