diff --git a/navalplanner-webapp/src/main/java/org/navalplanner/web/planner/allocation/streches/StretchesFunctionModel.java b/navalplanner-webapp/src/main/java/org/navalplanner/web/planner/allocation/streches/StretchesFunctionModel.java index ebc3cd889..b5e47df24 100644 --- a/navalplanner-webapp/src/main/java/org/navalplanner/web/planner/allocation/streches/StretchesFunctionModel.java +++ b/navalplanner-webapp/src/main/java/org/navalplanner/web/planner/allocation/streches/StretchesFunctionModel.java @@ -210,9 +210,9 @@ public class StretchesFunctionModel implements IStretchesFunctionModel { @Override public void addStretch() { if (stretchesFunction != null) { - Stretch stretch = new Stretch(); - stretch.setDate(new LocalDate(task.getStartDate())); - stretchesFunction.addStretch(stretch); + stretchesFunction.addStretch(Stretch.create( + task.getStartAsLocalDate(), BigDecimal.ZERO, + BigDecimal.ZERO)); } }