bugfix:
List "PREDEFINED" was not write-protected and started gathering values where it shouldnt Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -31,7 +31,7 @@ public class Project implements Mappable {
|
||||
this.companyId = companyId;
|
||||
this.showClosed = showClosed;
|
||||
this.members = members;
|
||||
this.allowedStates = allowedStates;
|
||||
this.allowedStates = new ArrayList<>(allowedStates);
|
||||
}
|
||||
|
||||
public Collection<Status> allowedStates(){
|
||||
|
||||
@@ -17,7 +17,7 @@ public record Status(String name, int code) implements Mappable {
|
||||
public static final Status STARTED = new Status("STARTED",40); // was 20
|
||||
public static final Status COMPLETE = new Status("COMPLETE",60);
|
||||
public static final Status CANCELLED = new Status("CANCELLED", 100);
|
||||
public static final List<Status> PREDEFINED = new ArrayList<>(List.of(OPEN, STARTED, PENDING, COMPLETE, CANCELLED));
|
||||
public static final List<Status> PREDEFINED = List.of(OPEN, STARTED, PENDING, COMPLETE, CANCELLED);
|
||||
|
||||
public static Status of(int code){
|
||||
return switch (code){
|
||||
|
||||
Reference in New Issue
Block a user