Included new column for the calculated budget to the WBS
FEA: ItEr77S17AutomaticBudgeting
This commit is contained in:
parent
15883806f5
commit
25e45b65e8
4 changed files with 53 additions and 0 deletions
|
|
@ -19,4 +19,30 @@
|
|||
onDelete="SET NULL" />
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="add-new-column-automatic_budget_enabled" author="ltilve">
|
||||
<comment>Add new column automatic_budget_enabled with default value FALSE to configuration table</comment>
|
||||
<addColumn tableName="configuration">
|
||||
<column name="automatic_budget_enabled" type="BOOLEAN" />
|
||||
</addColumn>
|
||||
<addDefaultValue tableName="configuration" columnName="automatic_budget_enabled"
|
||||
defaultValueBoolean="FALSE" />
|
||||
<addNotNullConstraint tableName="configuration"
|
||||
columnName="automatic_budget_enabled"
|
||||
defaultNullValue="FALSE"
|
||||
columnDataType="BOOLEAN" />
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="add-automatic_budget_type_of_work_hours-to-configuration" author="ltilve">
|
||||
<comment>
|
||||
Add new column automatic_budget_type_of_work_hours to
|
||||
configuration table.
|
||||
</comment>
|
||||
<addColumn tableName="configuration">
|
||||
<column name="automatic_budget_type_of_work_hours" type="BIGINT" />
|
||||
</addColumn>
|
||||
<addForeignKeyConstraint constraintName="automatic_budget_type_of_work_hours_fkey"
|
||||
baseTableName="configuration" baseColumnNames="automatic_budget_type_of_work_hours"
|
||||
referencedTableName="type_of_work_hours" referencedColumnNames="id" />
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
|
|
|
|||
|
|
@ -88,6 +88,12 @@
|
|||
</type>
|
||||
</property>
|
||||
|
||||
<many-to-one name="budgetDefaultTypeOfWorkHours" cascade="none"
|
||||
column="automatic_budget_type_of_work_hours" />
|
||||
|
||||
<property name="enabledAutomaticBudget" not-null="true"
|
||||
column="automatic_budget_enabled" />
|
||||
|
||||
<property name="maxUsers" column="max_users" />
|
||||
<property name="maxResources" column="max_resources" />
|
||||
|
||||
|
|
|
|||
|
|
@ -608,6 +608,17 @@ public class OrderElementTreeController extends TreeController<OrderElement> {
|
|||
super.removeCodeTextbox(key);
|
||||
}
|
||||
|
||||
public void addAutoBudgetCell(OrderElement currentElement) {
|
||||
String autobudget = " autobudget";
|
||||
for (CriterionRequirement criterionRequirement : currentElement
|
||||
.getCriterionRequirements()) {
|
||||
autobudget += criterionRequirement.getCriterion()
|
||||
.getCostCategory();
|
||||
autobudget += currentElement.getHoursGroups().toString();
|
||||
}
|
||||
addCell(new Textbox(autobudget));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -86,6 +86,16 @@ public class OrdersTreeComponent extends TreeComponent {
|
|||
treeRenderer.addBudgetCell(currentElement);
|
||||
}
|
||||
|
||||
});
|
||||
columns.add(new OrdersTreeColumn(_("autobudget"), "autobudget",
|
||||
_("autobudget")) {
|
||||
|
||||
@Override
|
||||
protected void doCell(OrderElementTreeitemRenderer treeRenderer,
|
||||
OrderElement currentElement) {
|
||||
treeRenderer.addAutoBudgetCell(currentElement);
|
||||
}
|
||||
|
||||
});
|
||||
columns.add(new OrdersTreeColumn(_("Must start after"),
|
||||
"estimated_init",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue