implemented selecting tasks by estimated time
This commit is contained in:
@@ -5,6 +5,7 @@ import static de.srsoftware.tools.Optionals.nullIfEmpty;
|
||||
import static de.srsoftware.umbrella.core.Constants.*;
|
||||
import static de.srsoftware.umbrella.core.Constants.SHOW_CLOSED;
|
||||
import static de.srsoftware.umbrella.core.Constants.STATUS;
|
||||
import static de.srsoftware.umbrella.core.Util.markdown;
|
||||
import static de.srsoftware.umbrella.task.Constants.*;
|
||||
|
||||
import de.srsoftware.tools.Mappable;
|
||||
@@ -42,7 +43,7 @@ public record Task(long id, long projectId, Long parentTaskId, String name, Stri
|
||||
map.put(PROJECT_ID, projectId);
|
||||
map.put(PARENT_TASK_ID, parentTaskId);
|
||||
map.put(NAME, name);
|
||||
map.put(DESCRIPTION, description);
|
||||
map.put(DESCRIPTION, Map.of(SOURCE,description,RENDERED,markdown(description)));
|
||||
map.put(STATUS, status);
|
||||
map.put(ESTIMATED_TIME, estimatedTime);
|
||||
map.put(START_DATE,start);
|
||||
|
||||
@@ -73,8 +73,10 @@ public class TaskModule extends BaseHandler {
|
||||
projects.forEach(project -> {
|
||||
var projectMap = new HashMap<>(project.toMap());
|
||||
var children = tree.values().stream().filter(root -> project.id() == (Long)root.get(PROJECT_ID)).toList();
|
||||
projectMap.put(FIELD_TASKS,children);
|
||||
result.add(projectMap);
|
||||
if (!children.isEmpty()) {
|
||||
projectMap.put(FIELD_TASKS, children);
|
||||
result.add(projectMap);
|
||||
}
|
||||
});
|
||||
return sendContent(ex,result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user