From b3ff14a14ba7658c81f798f2dd64b5535ec534bc Mon Sep 17 00:00:00 2001 From: bm Date: Tue, 3 Jul 2018 01:01:43 +0200 Subject: [PATCH] Bug in StatusUpdate found and marked --- .../com/viadee/sonarQuest/services/StandardTaskService.java | 3 +++ 1 file changed, 3 insertions(+) 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());