Disable the calculation of the assignedResource attribute in TaskElements from Company view.
That calculation loaded the relations with ResourceAllocations from DB and we want to prevent it in that screen. FEA: ItEr60S17CambiosPantallaVistaEmpresa
This commit is contained in:
parent
d37657ea03
commit
332bbe583d
2 changed files with 14 additions and 0 deletions
|
|
@ -138,6 +138,8 @@ public abstract class TaskElement extends BaseEntity {
|
|||
|
||||
private BigDecimal advancePercentage = BigDecimal.ZERO;
|
||||
|
||||
private Boolean assignedStatusDisabled = false;
|
||||
|
||||
public void initializeEndDateIfDoesntExist() {
|
||||
if (getEndDate() == null) {
|
||||
initializeEndDate();
|
||||
|
|
@ -501,7 +503,18 @@ public abstract class TaskElement extends BaseEntity {
|
|||
return result;
|
||||
}
|
||||
|
||||
public Boolean isAssignedStatusDisabled() {
|
||||
return assignedStatusDisabled;
|
||||
}
|
||||
|
||||
public void setAssignedStatusDisabled(Boolean disabled) {
|
||||
this.assignedStatusDisabled = disabled;
|
||||
}
|
||||
|
||||
public String getAssignedStatus() {
|
||||
if(isAssignedStatusDisabled()) {
|
||||
return "unassigned";
|
||||
}
|
||||
if (getSatisfiedResourceAllocations().isEmpty()) {
|
||||
return "unassigned";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -717,6 +717,7 @@ public abstract class CompanyPlanningModel implements ICompanyPlanningModel {
|
|||
if (associatedTaskElement != null
|
||||
&& STATUS_VISUALIZED.contains(order.getState())
|
||||
&& (predicate == null || predicate.accepts(order))) {
|
||||
associatedTaskElement.setAssignedStatusDisabled(true);
|
||||
result.add(associatedTaskElement);
|
||||
ordersToShow.add(order);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue