diff --git a/sonarQuest-backend/src/main/java/com/viadee/sonarQuest/services/StandardTaskService.java b/sonarQuest-backend/src/main/java/com/viadee/sonarQuest/services/StandardTaskService.java index 0dbd420e..e7321402 100644 --- a/sonarQuest-backend/src/main/java/com/viadee/sonarQuest/services/StandardTaskService.java +++ b/sonarQuest-backend/src/main/java/com/viadee/sonarQuest/services/StandardTaskService.java @@ -2,6 +2,7 @@ import java.util.List; +import org.hibernate.Session; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -42,6 +43,8 @@ public void updateStandardTasks(final World world) { } public StandardTask updateStandardTask(final StandardTask task) { + //FIXME - will not work with Hibernate/Spring-caching - when task is updated Hibernate will return new value here! + //so SOLVED will always be old and new Status with no rewards given final StandardTask lastState = standardTaskRepository.findByKey(task.getKey()); if (lastState != null) { final SonarQuestStatus newStatus = SonarQuestStatus.fromStatusText(task.getStatus());