implemented time tracking by clicking symbol at task.

next: stop running time, display running time in header

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2025-08-26 21:13:55 +02:00
parent 1ddb6af280
commit 72375b82cf
10 changed files with 79 additions and 59 deletions

View File

@@ -216,10 +216,19 @@ public class TaskModule extends BaseHandler implements TaskService {
return taskDb.listTasks(List.of(projectId));
}
private Task loadTaskOrNull(long taskId){
try {
return taskDb.load(taskId);
} catch (UmbrellaException e){
LOG.log(WARNING,e.getMessage());
return null;
}
}
@Override
public HashMap<Long, Task> load(Collection<Long> taskIds) {
try {
var map = taskIds.stream().map(taskDb::load).collect(Collectors.toMap(Task::id, t -> t));
var map = taskIds.stream().map(this::loadTaskOrNull).filter(Objects::nonNull).collect(Collectors.toMap(Task::id, t -> t));
return new HashMap<>(map);
} catch (Exception e){
throw new UmbrellaException(e.getMessage());