Beispiel #1
0
 private static IssueView GetIssueViewPerPerson(IssueView originalIssueView
     , PersonView personView)
 {
     var taskDetails
         = originalIssueView.Tasks
         .Where(t =>
             t.RefPersonId
             == personView.PersonId)
         .ToList();
     return new IssueView
         (originalIssueView.Issue
         , taskDetails);
 }
Beispiel #2
0
        /// <summary>
        /// Gets the simulated remaining hours for a given issue.
        /// </summary>
        /// <param name="issue">The issue.</param>
        /// <returns>
        /// The simulated remaining hours for the issue.
        /// </returns>
        private double GetSimulatedRemainingHoursForIssue(IssueView issue)
        {
            // For this issue the simulated remaining hours is calculated:
            double statisticalRemainingForIssue = 0d;

            // For this issue all associated tasks are treated individually:
            foreach (Task task in issue.Tasks)
            {
                // Gets the simulated remaining hours for the task:
                // and adds it to the sum for the issue:
                statisticalRemainingForIssue
                    += GetSimulatedRemainingHoursForTask(task);
            }

            // Returns the total simulated remaining hours for the issue:
            return statisticalRemainingForIssue;
        }