Bug #1521: Avoid update task end date when changing delivery date

FEA: ItEr76S04BugFixing
This commit is contained in:
Manuel Rego Casasnovas 2012-07-26 11:57:08 +02:00
parent a63ce33a80
commit f9a3e30694
2 changed files with 1 additions and 10 deletions

View file

@ -219,20 +219,11 @@ public class SubcontractModel implements ISubcontractModel {
subcontractedTaskData
.addRequiredDeliveringDates(subcontractorDeliverDate);
//update the end date of the task
updateEndDateWithDeliverDate();
//update the state of the subcontracted task data
updateStateToPendingUpdateDeliveringDate();
}
}
private void updateEndDateWithDeliverDate(){
SubcontractorDeliverDate lastDeliverDate = this
.getSubcontractedTaskData().getRequiredDeliveringDates().last();
task.setEndDate(lastDeliverDate.getSubcontractorDeliverDate());
}
private void updateStateToPendingUpdateDeliveringDate(){
if ((subcontractedTaskData.getState() != null)
&& (subcontractedTaskData.getState()

View file

@ -93,7 +93,7 @@
<hbox align="bottom" sclass="add-resources-or-criteria">
<label value="${i18n:_('New delivery date')}" />
<datebox id="newDeliverDate" value="@{subController.endDate}" />
<datebox id="newDeliverDate" />
<button label="${i18n:_('Add')}" onClick="subController.addDeliverDate(newDeliverDate)"/>
</hbox>