issue-18 #28

Merged
sebastian merged 55 commits from issue-18 into master 2023-10-28 19:36:14 +02:00
2 changed files with 3 additions and 10 deletions
Showing only changes of commit 8b7354de51 - Show all commits

View File

@ -5,7 +5,6 @@
</component>
<component name="ChangeListManager">
<list default="true" id="3a869f59-290a-4ab2-b036-a878ce801bc4" name="Changes" comment="Remove update spamming in console">
<change beforePath="$PROJECT_DIR$/src/main/java/core/api/controller/ScheduleController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/core/api/controller/ScheduleController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/core/services/TaskScheduleService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/core/services/TaskScheduleService.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
@ -100,7 +99,7 @@
<workItem from="1698127431684" duration="2039000" />
<workItem from="1698164397550" duration="2329000" />
<workItem from="1698246651541" duration="5106000" />
<workItem from="1698298897364" duration="3634000" />
<workItem from="1698298897364" duration="4242000" />
</task>
<task id="LOCAL-00001" summary="Structure Taskgroups in Hierarchies">
<option name="closed" value="true" />
@ -248,11 +247,6 @@
<line>167</line>
<option name="timeStamp" value="4" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/main/java/core/services/TaskScheduleService.java</url>
<line>125</line>
<option name="timeStamp" value="7" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
</component>

View File

@ -122,9 +122,8 @@ public class TaskScheduleService {
taskSchedule.setFinishedTime(LocalDateTime.now());
long activeTime = Duration.between(taskSchedule.getStartTime(), taskSchedule.getFinishedTime()).toMinutes();
long workTime = (taskSchedule.getTask().getWorkTime() + activeTime);
int workTime_i = (int) (workTime);
taskSchedule.getTask().setWorkTime(workTime_i);
long workTime = taskSchedule.getTask().getWorkTime() + activeTime;
taskSchedule.getTask().setWorkTime((int) workTime);
if(finish) {
taskSchedule.getTask().setFinished(true);
}