Keep tasks converted into containers also in the filtered WBS
This allows to add a task over a leaf in a filtered WBS, and being able to keep seeing the 3 elements: the new container (with the name of the previous leaf), the previous leaf without name and the new task added. It's easier to understand with an example. Imagine you have the following WBS: * Task 1 * Task 2 And you filter by task name using "2", then you'll have: * Task 2 Then you select "Task 2" and add a new task called "Subtask A". Without this patch you'll only see: * Task 2 (the new container using the name of the old leaf) |- Subtask A (the new task) However, it's better you see the following * Task 2 (the new container using the name of the old leaf) |- (empty task) (the old leaf that you should rename) |- Subtask A (the new task) FEA: ItEr77S15FilteringEnhancements
This commit is contained in:
parent
cdd4c74c32
commit
7fe5eb2350
3 changed files with 13 additions and 1 deletions
|
|
@ -1662,4 +1662,8 @@ public abstract class OrderElement extends IntegrationEntity implements
|
|||
return effort.toFormattedString();
|
||||
}
|
||||
|
||||
public boolean isConvertedToContainer() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,6 +88,8 @@ public class OrderLine extends OrderElement {
|
|||
|
||||
private Integer lastHoursGroupSequenceCode = 0;
|
||||
|
||||
private boolean convertedToContainer = false;
|
||||
|
||||
@Override
|
||||
public Integer getWorkHours() {
|
||||
return hoursGroupOrderLineHandler.calculateTotalHours(hoursGroups);
|
||||
|
|
@ -156,6 +158,7 @@ public class OrderLine extends OrderElement {
|
|||
result.setName(getName());
|
||||
setCode("");
|
||||
setName("");
|
||||
convertedToContainer = true;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -392,4 +395,9 @@ public class OrderLine extends OrderElement {
|
|||
return budget;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isConvertedToContainer() {
|
||||
return convertedToContainer;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ public class OrderElementPredicate implements IPredicate {
|
|||
if (orderElement == null) {
|
||||
return false;
|
||||
}
|
||||
if (orderElement.isNewObject()) {
|
||||
if (orderElement.isNewObject() || orderElement.isConvertedToContainer()) {
|
||||
return true;
|
||||
}
|
||||
if (acceptFilters(orderElement) && acceptFiltersDates(orderElement)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue