@@ -104,10 +104,13 @@ private static Deliverable createEditedDeliverable(
104104
105105 Deadline updatedDeadline = editDeliverableDescriptor .getDeadline ().orElse (deliverableToEdit .getDeadline ());
106106
107+ boolean updatedIsComplete = deliverableToEdit .getIsComplete ();
108+
107109 // Contacts takes optional String
108110 Contacts updatedContacts = editDeliverableDescriptor .getContacts ().orElse (deliverableToEdit .getContacts ());
109111
110- return new Deliverable (updatedTitle , updatedMilestone , updatedDesc , updatedDeadline , updatedContacts );
112+ return new Deliverable (
113+ updatedTitle , updatedMilestone , updatedDesc , updatedDeadline , updatedIsComplete , updatedContacts );
111114 }
112115
113116 @ Override
@@ -137,6 +140,7 @@ public static class EditDeliverableDescriptor {
137140 private Milestone milestone ;
138141 private OptionalDescription description ;
139142 private Deadline deadline ;
143+ private boolean isComplete ;
140144 private Contacts contacts ;
141145
142146 public EditDeliverableDescriptor () {
@@ -152,6 +156,7 @@ public EditDeliverableDescriptor(EditDeliverableDescriptor toCopy) {
152156 setMilestone (toCopy .milestone );
153157 setDescription (toCopy .description );
154158 setDeadline (toCopy .deadline );
159+ setIsComplete (toCopy .isComplete );
155160 setContacts (toCopy .contacts );
156161 }
157162
@@ -194,6 +199,14 @@ public Optional<Deadline> getDeadline() {
194199 return Optional .ofNullable (deadline );
195200 }
196201
202+ public void setIsComplete (boolean isComplete ) {
203+ this .isComplete = isComplete ;
204+ }
205+
206+ public Optional <Boolean > getIsComplete () {
207+ return Optional .ofNullable (this .isComplete );
208+ }
209+
197210 public void setContacts (Contacts contact ) {
198211 this .contacts = contact ;
199212 }
@@ -222,6 +235,7 @@ public boolean equals(Object other) {
222235 && getMilestone ().equals (e .getMilestone ())
223236 && getDescription ().equals (e .getDescription ())
224237 && getDeadline ().equals (e .getDeadline ())
238+ && getIsComplete ().equals (e .getIsComplete ())
225239 && getContacts ().equals (e .getContacts ());
226240 }
227241
0 commit comments