issue-117 #119
@ -75,6 +75,8 @@ public class Task {
|
||||
clonedSchedules.add(clonedSchedule);
|
||||
clonedTask.getBasicTaskSchedules().clear();
|
||||
clonedTask.getBasicTaskSchedules().add(clonedSchedule);
|
||||
|
||||
clonedSchedule.setTask(clonedTask);
|
||||
}
|
||||
|
||||
Set<Task> clonedSubtasks = new HashSet<>();
|
||||
|
@ -62,6 +62,7 @@ public class TaskSeriesService {
|
||||
List<AbstractSchedule> clonedSchedules = new ArrayList<>();
|
||||
|
||||
LocalDate currentDate = rootTask.getStartDate().plusDays(offsetMap.get(rootTask));
|
||||
long index = 1;
|
||||
while(currentDate.isBefore(endingDate)) {
|
||||
var cloneResult = rootTask.cloneTask();
|
||||
Task clonedRootTask = cloneResult.getValue00();
|
||||
@ -73,10 +74,11 @@ public class TaskSeriesService {
|
||||
taskSerie.addItem(item);
|
||||
}
|
||||
|
||||
clonedRootTask.shiftTask(offsetMap.get(rootTask));
|
||||
clonedRootTask.shiftTask(index * offsetMap.get(rootTask));
|
||||
|
||||
currentDate = currentDate.plusDays(offsetMap.get(rootTask));
|
||||
itemIndex += offsetMap.size();
|
||||
index++;
|
||||
}
|
||||
|
||||
return new Tupel<>(clonedTasks, clonedSchedules);
|
||||
@ -105,7 +107,7 @@ public class TaskSeriesService {
|
||||
HashMap<Task, Integer> offsetMap = new HashMap<>();
|
||||
offsetMap.put(rootTask, taskRepeatInfo.getOffset());
|
||||
|
||||
var repeatingResult = repeatTask(rootTask, taskRepeatInfo.getEndingDate(), offsetMap, taskSerie, 0);
|
||||
var repeatingResult = repeatTask(rootTask, taskRepeatInfo.getEndingDate(), offsetMap, taskSerie, 1);
|
||||
List<Task> clonedTasks = new ArrayList<>(repeatingResult.getValue00());
|
||||
List<AbstractSchedule> clonedSchedules = new ArrayList<>(repeatingResult.getValue01());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user