implemented editing of 'show closed tasks' setting in project
This commit is contained in:
@@ -13,7 +13,7 @@ import org.json.JSONObject;
|
||||
|
||||
public class Project implements Mappable {
|
||||
private final Map<Long,Member> members;
|
||||
private final boolean showClosed;
|
||||
private boolean showClosed;
|
||||
private final Long companyId;
|
||||
private Status status;
|
||||
private String name;
|
||||
@@ -67,9 +67,10 @@ public class Project implements Mappable {
|
||||
public Project patch(JSONObject json) {
|
||||
for (var key : json.keySet()){
|
||||
switch (key){
|
||||
case DESCRIPTION: description = json.getString(key); break;
|
||||
case NAME: name = json.getString(key); break;
|
||||
case STATUS: status = json.get(key) instanceof Number number ? Status.of(number.intValue()) : Status.valueOf(json.getString(key)); break;
|
||||
case DESCRIPTION: description = json.getString(key); break;
|
||||
case NAME: name = json.getString(key); break;
|
||||
case SHOW_CLOSED: showClosed = json.getBoolean(SHOW_CLOSED); break;
|
||||
case STATUS: status = json.get(key) instanceof Number number ? Status.of(number.intValue()) : Status.valueOf(json.getString(key)); break;
|
||||
default: key = null;
|
||||
}
|
||||
if (key != null) dirtyFields.add(key);
|
||||
|
||||
Reference in New Issue
Block a user