Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ public List<Task> getTasks() {
rootTask.setId(0);
rootTask.setParentId(-1);

Integer rootStart = 0;
Integer rootEnd = 0;

for (IProject project : projects) {
for (Task task : project.getTasks()) {
int origId = task.getId();
Expand All @@ -94,11 +97,22 @@ public List<Task> getTasks() {
if (!(task instanceof CompositeTask)) {
rootTask.addOwnerCost(task.getOwner(), task.getCost(), task.getFinishedCost());
}

if (rootStart == 0 || task.getStartOffset() < rootStart) {
rootStart = task.getStartOffset();
}

if (task.getEndOffset() > rootEnd) {
rootEnd = task.getEndOffset();
}
}

projectIdx++;
}

rootTask.setStartOffset(rootStart);
rootTask.setEndOffset(rootEnd);

ret.add(0, rootTask);

return ret;
Expand Down