diff --git a/ProgramManager/src/Application/GozareshgirProgramManager.Application/Modules/Projects/Queries/ProjectDeployBoardDetail/ProjectDeployBoardDetailsQueryHandler.cs b/ProgramManager/src/Application/GozareshgirProgramManager.Application/Modules/Projects/Queries/ProjectDeployBoardDetail/ProjectDeployBoardDetailsQueryHandler.cs index ddff2247..9d93332d 100644 --- a/ProgramManager/src/Application/GozareshgirProgramManager.Application/Modules/Projects/Queries/ProjectDeployBoardDetail/ProjectDeployBoardDetailsQueryHandler.cs +++ b/ProgramManager/src/Application/GozareshgirProgramManager.Application/Modules/Projects/Queries/ProjectDeployBoardDetail/ProjectDeployBoardDetailsQueryHandler.cs @@ -73,6 +73,7 @@ public class var doneTime = t.Sections.Aggregate(TimeSpan.Zero, (sum, next) => sum.Add(next.GetTotalTimeSpent())); + var skills = t.Sections .Select(s => { @@ -88,7 +89,14 @@ public class skillName, timePercentage); }).ToList(); - var taskPercentage = (int)Math.Round(skills.Average(x => x.TimePercentage)); + + int taskPercentage = 0; + + if (!skills.Any()) + { + taskPercentage = 0; + } + taskPercentage = (int)Math.Round(skills.Average(x => x.TimePercentage)); return new ProjectDeployBoardDetailTaskItem( t.Name,