Add new attribute finishedTimesheets in SumChargedEffort
FEA: ItEr77S12AdaptPlanningAccordingTimesheets
This commit is contained in:
parent
d07686af7e
commit
33d43babf7
3 changed files with 38 additions and 0 deletions
|
|
@ -23,8 +23,10 @@ package org.libreplan.business.orders.entities;
|
|||
|
||||
import java.util.Date;
|
||||
|
||||
import org.apache.commons.lang.BooleanUtils;
|
||||
import org.libreplan.business.common.BaseEntity;
|
||||
import org.libreplan.business.workingday.EffortDuration;
|
||||
import org.libreplan.business.workreports.entities.WorkReportLine;
|
||||
|
||||
/**
|
||||
* It represents the efforts charged to an {@link OrderElement}, avoiding the
|
||||
|
|
@ -45,6 +47,13 @@ public class SumChargedEffort extends BaseEntity {
|
|||
|
||||
private Date lastTimesheetDate;
|
||||
|
||||
/**
|
||||
* Finished according to timesheets. If <code>true</code> it means that
|
||||
* there's a {@link WorkReportLine} marking as finished this
|
||||
* {@link OrderElement}.
|
||||
*/
|
||||
private Boolean finishedTimesheets = false;
|
||||
|
||||
protected SumChargedEffort() {}
|
||||
|
||||
private SumChargedEffort(OrderElement orderElement) {
|
||||
|
|
@ -125,4 +134,12 @@ public class SumChargedEffort extends BaseEntity {
|
|||
setLastTimesheetDate(lastTimesheetDate);
|
||||
}
|
||||
|
||||
public Boolean isFinishedTimesheets() {
|
||||
return finishedTimesheets;
|
||||
}
|
||||
|
||||
public void setFinishedTimesheets(Boolean finishedTimesheets) {
|
||||
this.finishedTimesheets = BooleanUtils.isTrue(finishedTimesheets);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -119,4 +119,23 @@
|
|||
columnDataType="BOOLEAN" />
|
||||
</changeSet>
|
||||
|
||||
|
||||
<changeSet id="add-new-column-finished_timesheets-to-sum_charged_effort"
|
||||
author="mrego">
|
||||
<comment>
|
||||
Add new column finished_timesheets with default value FALSE to
|
||||
sum_charged_effort table.
|
||||
</comment>
|
||||
<addColumn tableName="sum_charged_effort">
|
||||
<column name="finished_timesheets" type="BOOLEAN" />
|
||||
</addColumn>
|
||||
<addDefaultValue tableName="sum_charged_effort"
|
||||
columnName="finished_timesheets"
|
||||
defaultValueBoolean="FALSE" />
|
||||
<addNotNullConstraint tableName="sum_charged_effort"
|
||||
columnName="finished_timesheets"
|
||||
defaultNullValue="FALSE"
|
||||
columnDataType="BOOLEAN" />
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
|
|
|
|||
|
|
@ -276,6 +276,8 @@
|
|||
column="first_timesheet_date" />
|
||||
<property name="lastTimesheetDate" access="field"
|
||||
column="last_timesheet_date" />
|
||||
<property name="finishedTimesheets"
|
||||
column="finished_timesheets" />
|
||||
|
||||
</class>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue