diff --git a/.semver.txt b/.semver.txt index 46354d7..b649b91 100644 --- a/.semver.txt +++ b/.semver.txt @@ -1 +1 @@ -1.0.52 +1.0.53 diff --git a/src/JiraTimeBot/Properties/AssemblyInfo.cs b/src/JiraTimeBot/Properties/AssemblyInfo.cs index 708fcd9..6428717 100644 --- a/src/JiraTimeBot/Properties/AssemblyInfo.cs +++ b/src/JiraTimeBot/Properties/AssemblyInfo.cs @@ -1,31 +1,31 @@ -using System.Reflection; -using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("JiraTimeBot")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("JiraTimeBot")] -[assembly: AssemblyCopyright("Copyright © 2019")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("f3b89316-c38c-4ce6-9d88-0b1373cfba1a")] -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// 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")] +using System.Reflection; +using System.Runtime.InteropServices; +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("JiraTimeBot")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("JiraTimeBot")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("f3b89316-c38c-4ce6-9d88-0b1373cfba1a")] +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// 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.53")] +[assembly: AssemblyFileVersion("1.0.53")] +[assembly: AssemblyInformationalVersion("1.0.53")] diff --git a/src/JiraTimeBot/TaskTime/TaskTimeByCommitsCalculator.cs b/src/JiraTimeBot/TaskTime/TaskTimeByCommitsCalculator.cs index ed697a7..f517aa1 100644 --- a/src/JiraTimeBot/TaskTime/TaskTimeByCommitsCalculator.cs +++ b/src/JiraTimeBot/TaskTime/TaskTimeByCommitsCalculator.cs @@ -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);