Indent tasks in project status report
FEA: ItEr77S09WBSReport
This commit is contained in:
parent
dee3588280
commit
4ac2564b61
3 changed files with 22 additions and 0 deletions
|
|
@ -670,4 +670,9 @@ public class Order extends OrderLineGroup implements Comparable {
|
|||
return neededToRecalculateSumExpenses;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOrder() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1541,4 +1541,8 @@ public abstract class OrderElement extends IntegrationEntity implements
|
|||
return this.sumExpenses;
|
||||
}
|
||||
|
||||
public boolean isOrder() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
package org.libreplan.business.reports.dtos;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.libreplan.business.orders.entities.OrderElement;
|
||||
import org.libreplan.business.orders.entities.SumChargedEffort;
|
||||
import org.libreplan.business.orders.entities.TaskSource;
|
||||
|
|
@ -58,6 +59,8 @@ public class ProjectStatusReportDTO {
|
|||
if (sumChargedEffort != null) {
|
||||
imputedHours = sumChargedEffort.getTotalChargedEffort();
|
||||
}
|
||||
|
||||
appendPrefixSpacesDependingOnDepth(orderElement);
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
|
|
@ -87,4 +90,14 @@ public class ProjectStatusReportDTO {
|
|||
return effortDuration.toFormattedString();
|
||||
}
|
||||
|
||||
private void appendPrefixSpacesDependingOnDepth(OrderElement orderElement) {
|
||||
int depth = 0;
|
||||
while (!orderElement.getParent().isOrder()) {
|
||||
depth++;
|
||||
orderElement = orderElement.getParent();
|
||||
}
|
||||
|
||||
name = StringUtils.repeat(" ", depth) + name;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue