diff --git a/.semver.txt b/.semver.txt index 9972f12..7eeb2c7 100644 --- a/.semver.txt +++ b/.semver.txt @@ -1 +1 @@ -1.0.61 +1.0.62 diff --git a/src/JiraTimeBot/Properties/AssemblyInfo.cs b/src/JiraTimeBot/Properties/AssemblyInfo.cs index 5b6dc8b..5d11983 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.61")] -[assembly: AssemblyFileVersion("1.0.61")] -[assembly: AssemblyInformationalVersion("1.0.61")] +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.62")] +[assembly: AssemblyFileVersion("1.0.62")] +[assembly: AssemblyInformationalVersion("1.0.62")] diff --git a/src/JiraTimeBot/TaskTime/Objects/CommitType.cs b/src/JiraTimeBot/TaskTime/Objects/CommitType.cs index 9006884..51b1806 100644 --- a/src/JiraTimeBot/TaskTime/Objects/CommitType.cs +++ b/src/JiraTimeBot/TaskTime/Objects/CommitType.cs @@ -1,7 +1,10 @@ -namespace JiraTimeBot.TaskTime.Objects +using System; + +namespace JiraTimeBot.TaskTime.Objects { + [Flags] public enum CommitType { - Task = 0, - Release = 1 + Task = 1, + Release = 2 } } \ No newline at end of file diff --git a/src/JiraTimeBot/TaskTime/TaskTimeByCommitsCalculator.cs b/src/JiraTimeBot/TaskTime/TaskTimeByCommitsCalculator.cs index 4796683..cefaf68 100644 --- a/src/JiraTimeBot/TaskTime/TaskTimeByCommitsCalculator.cs +++ b/src/JiraTimeBot/TaskTime/TaskTimeByCommitsCalculator.cs @@ -64,6 +64,7 @@ namespace JiraTimeBot.TaskTime { existingItem.TimeSpent += workTask.TimeSpent; existingItem.Description += "\r\n" + workTask.Description; + existingItem.Type |= CommitType.Task; continue; } diff --git a/src/JiraTimeBot/TasksProcessors/MeetingProcessor.cs b/src/JiraTimeBot/TasksProcessors/MeetingProcessor.cs index d50e192..06470b8 100644 --- a/src/JiraTimeBot/TasksProcessors/MeetingProcessor.cs +++ b/src/JiraTimeBot/TasksProcessors/MeetingProcessor.cs @@ -23,13 +23,13 @@ namespace JiraTimeBot.TasksProcessors { _log.Trace($"На реальную дату {realDate:dd.MM.yyyy} распределение по задачам:"); - foreach (var taskTime in taskTimes.Where(f=>f.Type == CommitType.Task).OrderByDescending(f => f.TimeSpent)) + foreach (var taskTime in taskTimes.Where(f=>f.Type.HasFlag(CommitType.Task)).OrderByDescending(f => f.TimeSpent)) { var taskName = _jiraApi.GetTaskName(taskTime.Branch, settings); _log.Trace($" - [{taskTime.Branch}, коммитов {taskTime.Commits}]: {taskName} - {taskTime.TimeSpent}"); } - var releases = taskTimes.Where(f => f.Type == CommitType.Release).GroupBy(f=>f.Description); + var releases = taskTimes.Where(f => f.Type.HasFlag(CommitType.Release)).GroupBy(f=>f.Description); foreach (var release in releases) { var sum = release.Sum(f => (int) f.TimeSpent.TotalMinutes);