public decimal GetShareOfEffortOnWorklog(JiraWorklog jiraWorklog) { decimal result = 0; if (TotalHours > 0) { result = GetHoursOnWorklog(jiraWorklog) / TotalHours; } return(result); }
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); }
public decimal GetHoursOnWorklog(JiraWorklog jiraWorklog) { decimal result = Convert.ToDecimal(jiraWorklog.Duration.TotalHours); return(result); }
public void AddWorklog(JiraWorklog jiraWorklog) { _worklogs.Add(jiraWorklog); }