Skip to content

Commit 7785578

Browse files
author
Martin Plieske
committed
use old logic in calcTodaysWorkSeconds()
1 parent 4e09909 commit 7785578

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/main/java/de/doubleslash/keeptime/controller/Controller.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,12 @@ public void setComment(final String notes) {
238238
public long calcTodaysWorkSeconds() {
239239
final List<Work> workItems = new ArrayList<>();
240240

241-
for (final Work w : model.getPastWorkItems()) {
242-
if (w.getProject().isWork()) {
243-
workItems.add(w);
241+
for (final Work work : model.getPastWorkItems()) {
242+
final Project project = work.getProject();
243+
for (final Project p : model.getAllProjects()) {
244+
if (p.getId() == project.getId() && project.isWork()) {
245+
workItems.add(work);
246+
}
244247
}
245248
}
246249

0 commit comments

Comments
 (0)