Keep task name for the new container if it is an empty leaf

This change implements the behaviour described in the analysis that you can
easily understand with the following example:

1) Initial scenario:
  * Task leaf "A" (0 hours)
  * Task leaf "B" (20 hours)
2) Indent task leaf "B"
3) Final scenario:
  * Task container "A" (20 hours)
    |- Task leaf "B" (20 hours)

FEA: ItEr76S13WBSSettingUpBehavior
This commit is contained in:
Manuel Rego Casasnovas 2012-02-24 13:35:22 +01:00
parent 2eaf3de5cd
commit 3e3eba1e81

View file

@ -144,7 +144,11 @@ public class OrderLine extends OrderElement {
@Override
public OrderLineGroup toContainer() {
OrderLineGroup result = OrderLineGroup.create();
result.setName("new container");
String name = "new container";
if (isEmptyLeaf()) {
name = getName();
}
result.setName(name);
return result;
}