avoiding markdown rendering when reading task list
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -139,6 +139,7 @@ public class Field {
|
||||
|
||||
public static final String RECEIVERS = "receivers";
|
||||
public static final String REDIRECT = "redirect";
|
||||
public static final String RENDER = "render";
|
||||
public static final String RENDERED = "rendered";
|
||||
public static final String REQUIRED_TASKS_IDS = "required_tasks_ids";
|
||||
|
||||
|
||||
@@ -118,8 +118,7 @@ public class Project extends UmbrellaObject {
|
||||
return tagColors;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> toMap() {
|
||||
public Map<String, Object> toMap(boolean renderMarkdown){
|
||||
var memberMap = new HashMap<Long,Map<String,Object>>();
|
||||
if (members != null) for (var entry : members.entrySet()){
|
||||
memberMap.put(entry.getKey(),entry.getValue().toMap());
|
||||
@@ -128,7 +127,7 @@ public class Project extends UmbrellaObject {
|
||||
for (var state : allowedStates) stateMap.put(state.code(),state.name());
|
||||
return super.map(
|
||||
NAME,name,
|
||||
DESCRIPTION,mapMarkdown(description),
|
||||
DESCRIPTION, renderMarkdown ? mapMarkdown(description) : Map.of(SOURCE,description),
|
||||
STATUS,status,
|
||||
COMPANY_ID,companyId,
|
||||
SHOW_CLOSED,showClosed,
|
||||
@@ -137,6 +136,11 @@ public class Project extends UmbrellaObject {
|
||||
TAG_COLORS,tagColors);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> toMap() {
|
||||
return toMap(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return name();
|
||||
|
||||
Reference in New Issue
Block a user