implemented option to list tasks without rendering markdown
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -228,20 +228,19 @@ public class Task implements Mappable {
|
||||
return tags;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> toMap() {
|
||||
public Map<String,Object> toMap(boolean renderMarkdown){
|
||||
var map = new HashMap<String,Object>();
|
||||
var memberMap = new HashMap<Long,Map<String,Object>>();
|
||||
if (members != null) for (var entry : members.entrySet()){
|
||||
memberMap.put(entry.getKey(),entry.getValue().toMap());
|
||||
}
|
||||
map.put(ID, id);
|
||||
map.put(PROJECT_ID, projectId);
|
||||
map.put(PARENT_TASK_ID, parentTaskId);
|
||||
map.put(PRIORITY,priority);
|
||||
map.put(NAME, name);
|
||||
map.put(DESCRIPTION, mapMarkdown(description));
|
||||
map.put(STATUS, status);
|
||||
map.put(PROJECT_ID, projectId);
|
||||
map.put(PARENT_TASK_ID, parentTaskId);
|
||||
map.put(PRIORITY,priority);
|
||||
map.put(NAME, name);
|
||||
map.put(DESCRIPTION, renderMarkdown ? mapMarkdown(description) : Map.of(SOURCE,description));
|
||||
map.put(STATUS, status);
|
||||
map.put(EST_TIME, estimatedTime);
|
||||
map.put(START_DATE,start);
|
||||
map.put(DUE_DATE,dueDate);
|
||||
@@ -254,6 +253,11 @@ public class Task implements Mappable {
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> toMap() {
|
||||
return toMap(true);
|
||||
}
|
||||
|
||||
private int totalPrio() {
|
||||
if (status >= Status.COMPLETE.code()) return 0; // task is done, do no longer highlight
|
||||
int total = priority;
|
||||
|
||||
Reference in New Issue
Block a user