Replace index placeholder for root-task
All checks were successful
Java CI with Maven / build-and-push-frontend (push) Successful in 7s
Java CI with Maven / build-and-push-backend (push) Successful in 7s

This commit is contained in:
Sebastian Böckelmann 2024-03-15 09:45:54 +01:00
parent 4b9dd4d17c
commit 59ee88b5fe

View File

@ -27,9 +27,10 @@ public class TaskSeriesService {
return ServiceExitCode.INVALID_PARAMETER;
}
rootTask.setTaskName(rootTask.getTaskName().replace("${i}", convertIndexToString(1)));
LocalDate currentTaskDate = rootTask.getStartDate().plusDays(taskRepeatInfo.getOffset());
TaskSerie taskSerie = new TaskSerie();
int index = 1;
int index = 2;
while(currentTaskDate.isBefore(taskRepeatInfo.getEndingDate())) {
Task task = Task.cloneTask(rootTask);
task.setStartDate(currentTaskDate);