Esempio n. 1
0
        private static Task CreateTestTask()
        {
            Task task = new Task();
            task.KeyName = "TEST";
            task.Estimation = 10;
            task.IsTaskRelatesToDevelopment = true;
            task.Url = "https://preciseq.atlassian.net/browse/AL-768";

            return task;
        }
Esempio n. 2
0
 private void AddTaskToGroup(TaskGroup group, Task task)
 {
     Task taskCopy = task.ShallowCopy();
     if (group.IsSummary)
         taskCopy.IsTaskAssigned = true;
     Task groupExistingTask = group.Tasks.FirstOrDefault(x => x.Key == taskCopy.Key);
     if (groupExistingTask == null)
     {
         group.Tasks.Add(taskCopy);
     }
     else
     {
         AddDataToTask(groupExistingTask, taskCopy);
     }
 }
Esempio n. 3
0
        private void WriteTaskData(ExcelWorksheet ws, Task task, int row)
        {
            ws.Cells[row, (int)TaskDataPosition.Key].Value = task.KeyName;
            ws.Cells[row, (int)TaskDataPosition.Title].Value = task.Title;

            ws.Cells[row, (int)TaskDataPosition.Estimation].Value = PrepareDouble(task.Estimation);
            ws.Cells[row, (int)TaskDataPosition.Estimation].Style.NumberFormat = DOUBLE_FORMAT;

            ws.Cells[row, (int)TaskDataPosition.TimeSpentByDev].Value = PrepareDouble(task.TimeSpentByDev);
            ws.Cells[row, (int)TaskDataPosition.TimeSpentByDev].Style.NumberFormat = DOUBLE_FORMAT;

            ws.Cells[row, (int)TaskDataPosition.IsDone].Value = BoolToString(task.IsDone);
            ws.Cells[row, (int)TaskDataPosition.IsTaskRelatesToMettings].Value = BoolToString(task.IsTaskRelatesToMettings);
            ws.Cells[row, (int)TaskDataPosition.IsTaskRelatesToDevelopment].Value = BoolToString(task.IsTaskRelatesToDevelopment);
            ws.Cells[row, (int)TaskDataPosition.IsTaskAssigned].Value = BoolToString(task.IsTaskAssigned);
            ws.Cells[row, (int)TaskDataPosition.Status].Value = task.Status;

            ws.Cells[row, (int)TaskDataPosition.UnderEstimate].Value = PrepareDouble(task.UnderEstimate);
            ws.Cells[row, (int)TaskDataPosition.UnderEstimate].Style.NumberFormat = DOUBLE_FORMAT;

            ws.Cells[row, (int)TaskDataPosition.Url].Value = task.Url;
        }
Esempio n. 4
0
 private void AddDataToTask(Task existingTask, Task extraData)
 {
     existingTask.TimeSpentByDev += extraData.TimeSpentByDev;
 }
Esempio n. 5
0
        private Task CreateTask(WorkLogDataRow row, ModelSettings settings)
        {
            Task task = new Task();
            task.Key = row.Key;
            task.KeyName = row.Key;
            if (string.IsNullOrEmpty(settings.SourceFileSettings.UrlField.PrefixToValue))
                task.Url = row.Url;
            else
                task.Url = settings.SourceFileSettings.UrlField.PrefixToValue + row.Url;

            task.Status = row.Status;
            task.Title = row.Title;
            double estimation = 0;
            if (settings.SourceFileSettings.EstimationField.IsUseStoryPointsFromMainPosition)
            {
                double estimationStoryPoints =  GetDouble(row.OriginalEstimateStoryPoints);
                double cost = settings.SourceFileSettings.EstimationField.StoryPointCost;
                estimation = estimationStoryPoints * cost;
                if (estimation  < 0.000001)
                {
                    estimation = GetDouble(row.OriginalEstimateHours);
                }
            }
            else
            {
                estimation =  GetDouble(row.OriginalEstimateHours);
            }
            task.Estimation = estimation;
            task.TimeSpentByDev = GetDouble(row.TimeSpent);

            task.IsDone = GetIsDone(row.Status, settings.DoneStatuses);
            task.IsTaskRelatesToMettings = GetIsMeeting(row.Key, settings.MeetingTasks);
            task.IsTaskRelatesToDevelopment = !task.IsTaskRelatesToMettings;
            task.IsTaskAssigned = GetIsTaskAssigned(row.UserName, row.Assignee, settings.SourceFileSettings.AssigneeField.NameMapping);
            return task;
        }