Compare commits

...
3 Commits
5 changed files with 38 additions and 38 deletions
+1 -1
View File
@@ -1 +1 @@
1.0.52
1.0.55
+2 -2
View File
@@ -146,7 +146,7 @@ namespace JiraTimeBot.JiraIntegration
{
try
{
issue.DeleteWorklogAsync(workLog, token: cancellationToken);
issue.DeleteWorklogAsync(workLog, WorklogStrategy.RetainRemainingEstimate, token: cancellationToken);
}
catch (Exception ex)
{
@@ -172,7 +172,7 @@ namespace JiraTimeBot.JiraIntegration
{
try
{
workLogToAdd = issue.AddWorklogAsync(workLogToAdd, token: cancellationToken).Result;
workLogToAdd = issue.AddWorklogAsync(workLogToAdd, WorklogStrategy.RetainRemainingEstimate, token: cancellationToken).Result;
}
catch (Exception ex)
{
@@ -12,8 +12,8 @@ namespace JiraTimeBot.Mercurial.Modifiers
}
//Пропускаем Close и Merge коммиты
if (commitMessage.StartsWith($"Close {branch} ", StringComparison.InvariantCultureIgnoreCase) ||
commitMessage.StartsWith($"Merge with ", StringComparison.InvariantCultureIgnoreCase))
if (commitMessage.StartsWith($"Close {branch}", StringComparison.InvariantCultureIgnoreCase) ||
commitMessage.StartsWith($"Merge with", StringComparison.InvariantCultureIgnoreCase))
{
return true;
}
+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
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.52")]
[assembly: AssemblyFileVersion("1.0.52")]
[assembly: AssemblyInformationalVersion("1.0.52")]
[assembly: AssemblyVersion("1.0.55")]
[assembly: AssemblyFileVersion("1.0.55")]
[assembly: AssemblyInformationalVersion("1.0.55")]
@@ -65,7 +65,7 @@ namespace JiraTimeBot.TaskTime
}
int currentTaskCommits = taskGroup.Count();
int currentTaskTime = (int)RoundTo(minutesPerWorkDay / totalCommitsCount * currentTaskCommits, settings.RoundToMinutes);
int currentTaskTime = (int)RoundTo(minutesPerWorkDay / totalCommitsCount * currentTaskCommits, settings.RoundToMinutes, false);
remainMinutes = remainMinutes - currentTaskTime;
var orderedTasks = taskGroup.OrderBy(f => f.Time).ToArray();
@@ -99,7 +99,7 @@ namespace JiraTimeBot.TaskTime
_log.Trace($"Погрешность распределения времени: {remainMinutes}. Добавляю к первой задаче.");
}
if (workTimeItems.First().Time.TotalMinutes > Math.Abs(remainMinutes) && remainMinutes < 0)
if ((workTimeItems.First().Time.TotalMinutes > Math.Abs(remainMinutes) && remainMinutes < 0) || remainMinutes > 0)
{
//если переборщили или не достаточно добавили до 8 часов - скореектируем остаток в первой задаче (она самая трудозатратная).
workTimeItems.First().Time += TimeSpan.FromMinutes(remainMinutes);