diff --git a/src/main/java/ch/zhaw/gartenverwaltung/backgroundtasks/weather/WeatherGradenTaskPlanner.java b/src/main/java/ch/zhaw/gartenverwaltung/backgroundtasks/weather/WeatherGradenTaskPlanner.java index 84ec59e..55a9bf5 100644 --- a/src/main/java/ch/zhaw/gartenverwaltung/backgroundtasks/weather/WeatherGradenTaskPlanner.java +++ b/src/main/java/ch/zhaw/gartenverwaltung/backgroundtasks/weather/WeatherGradenTaskPlanner.java @@ -86,7 +86,7 @@ public class WeatherGradenTaskPlanner { // vom startdatum abhängig, private void adjustNextExecutionOfWateringTask(List 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))); } } diff --git a/src/main/resources/ch/zhaw/gartenverwaltung/io/taskdb.json b/src/main/resources/ch/zhaw/gartenverwaltung/io/taskdb.json index 7b86231..889451a 100644 --- a/src/main/resources/ch/zhaw/gartenverwaltung/io/taskdb.json +++ b/src/main/resources/ch/zhaw/gartenverwaltung/io/taskdb.json @@ -14,10 +14,10 @@ "id": 2, "name": "water plant", "description": "water the plant, so that the soil is wet around the plant.", - "startDate": "2022-05-01", - "nextExecution": "2022-05-01", + "startDate": "2022-10-29", + "nextExecution": "2022-11-30", "nextNotification": "2022-05-01", - "endDate": "2022-09-01", + "endDate": "2022-12-31", "interval": 2, "cropId": 0 },