Bug #1499: Fix project costs report only showing information in projects with permissions
FEA: ItEr76S04BugFixing
This commit is contained in:
parent
fbce98caa7
commit
e86bcb4647
2 changed files with 10 additions and 9 deletions
|
|
@ -99,11 +99,11 @@ public class OrderDAO extends IntegrationEntityDAO<Order> implements
|
|||
super.remove(id);
|
||||
}
|
||||
|
||||
private boolean isOrderNameContained(String code, List<Order> orders) {
|
||||
private boolean isOrderContained(Order order, List<Order> orders) {
|
||||
for (Order each : orders) {
|
||||
if (each.getCode().equals(code)) {
|
||||
return true;
|
||||
}
|
||||
if (each.getId().equals(order.getId())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
@ -157,13 +157,11 @@ public class OrderDAO extends IntegrationEntityDAO<Order> implements
|
|||
List<OrderCostsPerResourceDTO> filteredList = new ArrayList<OrderCostsPerResourceDTO>();
|
||||
for (OrderCostsPerResourceDTO each : list) {
|
||||
|
||||
OrderElement order = loadOrderAvoidingProxyFor(each
|
||||
.getOrderElement());
|
||||
Order order = loadOrderAvoidingProxyFor(each.getOrderElement());
|
||||
|
||||
// Apply filtering
|
||||
if (matchFilterCriterion(each.getOrderElement(), criterions)
|
||||
&& (orders.isEmpty() || isOrderNameContained(order
|
||||
.getCode(), orders))) {
|
||||
&& isOrderContained(order, orders)) {
|
||||
|
||||
// Attach ordername value
|
||||
each.setOrderName(order.getName());
|
||||
|
|
|
|||
|
|
@ -123,8 +123,11 @@ public class OrderCostsPerResourceModel implements IOrderCostsPerResourceModel {
|
|||
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public JRDataSource getOrderReport(final List<Order> orders, Date startingDate,
|
||||
public JRDataSource getOrderReport(List<Order> orders, Date startingDate,
|
||||
Date endingDate, List<Label> labels, List<Criterion> criterions) {
|
||||
if (orders.isEmpty()) {
|
||||
orders = allOrders;
|
||||
}
|
||||
|
||||
reattachLabels();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue