Skip to content

Commit

Permalink
Update WorkItem.java
Browse files Browse the repository at this point in the history
  • Loading branch information
scmacdon authored Oct 28, 2022
1 parent d213cc3 commit d25fb51
Showing 1 changed file with 20 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,17 @@ public class WorkItem {
private String date;
private String description;
private String status;
private boolean archived ;

public static WorkItem from(List<Field> fields) {
var item = new WorkItem();
for (int i = 0; i <= 5; i++) {
String value = fields.get(i).stringValue();
for (int i = 0; i <= 6; i++) {
String value="";
boolean val = false;
value = fields.get(i).stringValue();
if (i == 6)
val = fields.get(i).booleanValue();

switch (i) {
case 0:
item.setId(value);
Expand All @@ -40,11 +46,22 @@ public static WorkItem from(List<Field> fields) {
case 5:
item.setName(value);
break;
case 6:
item.setArchived(val);
break;
}
}
return item;
}

public boolean getArchived() {
return this.archived;
}

public void setArchived(boolean archived) {
this.archived = archived;
}

public void setId(String id) {
this.id = id;
}
Expand Down Expand Up @@ -93,4 +110,4 @@ public void setGuide(String guide) {
public String getGuide() {
return this.guide;
}
}
}

0 comments on commit d25fb51

Please sign in to comment.