Example #1
0
        public decimal GetShareOfEffortOnWorklog(JiraWorklog jiraWorklog)
        {
            decimal result = 0;

            if (TotalHours > 0)
            {
                result = GetHoursOnWorklog(jiraWorklog) / TotalHours;
            }

            return(result);
        }
Example #2
0
        public void AddWorklogForUser(string user, JiraWorklog jiraWorklog)
        {
            //Timesheet timesheet = _userToTimesheet.GetOrCreate(user, new Timesheet(user));
            bool exists = _userToTimesheet.TryGetValue(user, out var timesheet);

            if (!exists)
            {
                timesheet = new Timesheet(user);
                _userToTimesheet.Add(user, timesheet);
            }

            timesheet.AddWorklog(jiraWorklog);
        }
Example #3
0
        public decimal GetHoursOnWorklog(JiraWorklog jiraWorklog)
        {
            decimal result = Convert.ToDecimal(jiraWorklog.Duration.TotalHours);

            return(result);
        }
Example #4
0
 public void AddWorklog(JiraWorklog jiraWorklog)
 {
     _worklogs.Add(jiraWorklog);
 }