improved tag inheritance
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -361,10 +361,13 @@ public class TaskModule extends BaseHandler implements TaskService {
|
||||
// do actual member assignment
|
||||
for (var entry : newMembers.entrySet()) taskDb.setMember(task.id(), entry.getKey(), entry.getValue());
|
||||
|
||||
Collection<String> tagList = null;
|
||||
if (json.has(TAGS) && json.get(TAGS) instanceof JSONArray arr) {
|
||||
var tagList = arr.toList().stream().filter(e -> e instanceof String).map(String.class::cast).toList();
|
||||
tagService().save(TASK,task.id(),null,tagList);
|
||||
tagList = arr.toList().stream().filter(e -> e instanceof String).map(String.class::cast).toList();
|
||||
}
|
||||
if ((tagList == null || tagList.isEmpty()) && parentTask != null) tagList = tagService().getTags(TASK, parentTask.id(), user);
|
||||
if ((tagList == null || tagList.isEmpty())) tagList = tagService().getTags(PROJECT, projectId, user);
|
||||
if (tagList != null && !tagList.isEmpty()) tagService().save(TASK, task.id(), null, tagList);
|
||||
return sendContent(ex, loadMembers(task));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user