[Bug #729] Fix bug
The problem persisted because the dates were being copied directly from TaskDTO. Now this is avoided. FEA: ItEr63S03BugFixing
This commit is contained in:
parent
265327a7ef
commit
ed77a8ad45
2 changed files with 14 additions and 5 deletions
|
|
@ -71,7 +71,13 @@ public class TaskEditFormComposer extends GenericForwardComposer {
|
|||
|
||||
public void accept() {
|
||||
if (currentTask != null) {
|
||||
copyFromDTO(taskDTO, currentTask);
|
||||
copyFromDTO(taskDTO, currentTask, true);
|
||||
}
|
||||
}
|
||||
|
||||
public void acceptWithoutCopyingDates() {
|
||||
if (currentTask != null) {
|
||||
copyFromDTO(taskDTO, currentTask, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -105,10 +111,13 @@ public class TaskEditFormComposer extends GenericForwardComposer {
|
|||
return result;
|
||||
}
|
||||
|
||||
private void copyFromDTO(TaskDTO taskDTO, Task currentTask) {
|
||||
private void copyFromDTO(TaskDTO taskDTO, Task currentTask,
|
||||
boolean copyDates) {
|
||||
currentTask.setName(taskDTO.name);
|
||||
currentTask.setBeginDate(GanttDate.createFrom(taskDTO.beginDate));
|
||||
currentTask.resizeTo(GanttDate.createFrom(taskDTO.endDate));
|
||||
if (copyDates) {
|
||||
currentTask.setBeginDate(GanttDate.createFrom(taskDTO.beginDate));
|
||||
currentTask.resizeTo(GanttDate.createFrom(taskDTO.endDate));
|
||||
}
|
||||
currentTask.setNotes(taskDTO.notes);
|
||||
currentTask.setDeadline(taskDTO.deadlineDate);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -408,7 +408,7 @@ public class TaskPropertiesController extends GenericForwardComposer {
|
|||
ok = saveConstraintChanges();
|
||||
}
|
||||
if (ok) {
|
||||
taskEditFormComposer.accept();
|
||||
taskEditFormComposer.acceptWithoutCopyingDates();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue