issue-117 #119
@ -62,6 +62,7 @@ public class TaskSeriesService {
|
|||||||
List<AbstractSchedule> clonedSchedules = new ArrayList<>();
|
List<AbstractSchedule> clonedSchedules = new ArrayList<>();
|
||||||
|
|
||||||
LocalDate currentDate = rootTask.getStartDate().plusDays(offsetMap.get(rootTask));
|
LocalDate currentDate = rootTask.getStartDate().plusDays(offsetMap.get(rootTask));
|
||||||
|
long index = 1;
|
||||||
while(currentDate.isBefore(endingDate)) {
|
while(currentDate.isBefore(endingDate)) {
|
||||||
var cloneResult = rootTask.cloneTask();
|
var cloneResult = rootTask.cloneTask();
|
||||||
Task clonedRootTask = cloneResult.getValue00();
|
Task clonedRootTask = cloneResult.getValue00();
|
||||||
@ -73,10 +74,11 @@ public class TaskSeriesService {
|
|||||||
taskSerie.addItem(item);
|
taskSerie.addItem(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
clonedRootTask.shiftTask(offsetMap.get(rootTask));
|
clonedRootTask.shiftTask(index * offsetMap.get(rootTask));
|
||||||
|
|
||||||
currentDate = currentDate.plusDays(offsetMap.get(rootTask));
|
currentDate = currentDate.plusDays(offsetMap.get(rootTask));
|
||||||
itemIndex += offsetMap.size();
|
itemIndex += offsetMap.size();
|
||||||
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Tupel<>(clonedTasks, clonedSchedules);
|
return new Tupel<>(clonedTasks, clonedSchedules);
|
||||||
|
Loading…
Reference in New Issue
Block a user