#23 bugfix adjust task
This commit is contained in:
parent
028bc0240d
commit
5e42cae290
|
@ -86,7 +86,7 @@ public class WeatherGradenTaskPlanner {
|
||||||
// vom startdatum abhängig,
|
// vom startdatum abhängig,
|
||||||
private void adjustNextExecutionOfWateringTask(List<Task> cropTaskList){
|
private void adjustNextExecutionOfWateringTask(List<Task> cropTaskList){
|
||||||
for(Task task : cropTaskList){
|
for(Task task : cropTaskList){
|
||||||
if(task.getName().equals("watering task")){
|
if(task.getName().equals("water plant")){
|
||||||
task.setNextExecution(task.getNextExecution().plusDays(task.getInterval().orElse(1)));
|
task.setNextExecution(task.getNextExecution().plusDays(task.getInterval().orElse(1)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,10 +14,10 @@
|
||||||
"id": 2,
|
"id": 2,
|
||||||
"name": "water plant",
|
"name": "water plant",
|
||||||
"description": "water the plant, so that the soil is wet around the plant.",
|
"description": "water the plant, so that the soil is wet around the plant.",
|
||||||
"startDate": "2022-05-01",
|
"startDate": "2022-10-29",
|
||||||
"nextExecution": "2022-05-01",
|
"nextExecution": "2022-11-30",
|
||||||
"nextNotification": "2022-05-01",
|
"nextNotification": "2022-05-01",
|
||||||
"endDate": "2022-09-01",
|
"endDate": "2022-12-31",
|
||||||
"interval": 2,
|
"interval": 2,
|
||||||
"cropId": 0
|
"cropId": 0
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue