refactoring Events for better journal

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2026-01-10 01:10:24 +01:00
parent 0dd640de30
commit 10ea200a2e
9 changed files with 89 additions and 55 deletions

View File

@@ -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;
}