refactoring Events for better journal
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -27,7 +27,7 @@ public class Task implements Mappable {
|
||||
private boolean noIndex, showClosed;
|
||||
private final Map<Long, Member> members;
|
||||
private final Set<String> dirtyFields = new HashSet<>();
|
||||
|
||||
private final Set<String> tags = new HashSet<>();
|
||||
|
||||
public Task (long id, long projectId, Long parentTaskId, String name, String description, int status, Double estimatedTime, LocalDate start, LocalDate dueDate, boolean showClosed, boolean noIndex, Map<Long,Member> members, int priority){
|
||||
this.id = id;
|
||||
@@ -218,6 +218,16 @@ public class Task implements Mappable {
|
||||
return status;
|
||||
}
|
||||
|
||||
public Task tags(Collection<String> newValue){
|
||||
tags.clear();
|
||||
tags.addAll(newValue);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Set<String> tags(){
|
||||
return tags;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> toMap() {
|
||||
var map = new HashMap<String,Object>();
|
||||
@@ -240,7 +250,7 @@ public class Task implements Mappable {
|
||||
map.put(REQUIRED_TASKS_IDS,requiredTasksIds);
|
||||
map.put(SHOW_CLOSED,showClosed);
|
||||
map.put(TOTAL_PRIO,totalPrio());
|
||||
|
||||
map.put(TAGS,tags);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user