Bug #1343: Mark closed projects with a special class in the gantt.
This is a step previous to show these kind of tasks in a different way. FEA: ItEr76S04BugFixing
This commit is contained in:
parent
abf5065ffd
commit
35b2bde4f7
6 changed files with 33 additions and 0 deletions
|
|
@ -220,6 +220,9 @@ public class TaskComponent extends Div implements AfterCompose {
|
|||
cssClass += task.isLimitingAndHasDayAssignments() ? " limiting-assigned "
|
||||
: " limiting-unassigned ";
|
||||
}
|
||||
if (task.belongsClosedProject()) {
|
||||
cssClass += " project-closed ";
|
||||
}
|
||||
return cssClass;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -267,4 +267,9 @@ public class DefaultFundamentalProperties implements ITaskFundamentalProperties
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean belongsClosedProject() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,4 +107,6 @@ public interface ITaskFundamentalProperties {
|
|||
|
||||
boolean isManualAnyAllocation();
|
||||
|
||||
public boolean belongsClosedProject();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -451,4 +451,8 @@ public abstract class Task implements ITaskFundamentalProperties {
|
|||
return fundamentalProperties.isManualAnyAllocation();
|
||||
}
|
||||
|
||||
public boolean belongsClosedProject() {
|
||||
return fundamentalProperties.belongsClosedProject();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ import java.util.Collections;
|
|||
import java.util.Comparator;
|
||||
import java.util.ConcurrentModificationException;
|
||||
import java.util.Date;
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
|
@ -47,6 +48,7 @@ import org.libreplan.business.common.BaseEntity;
|
|||
import org.libreplan.business.common.entities.ProgressType;
|
||||
import org.libreplan.business.orders.entities.Order;
|
||||
import org.libreplan.business.orders.entities.OrderElement;
|
||||
import org.libreplan.business.orders.entities.OrderStatusEnum;
|
||||
import org.libreplan.business.orders.entities.TaskSource;
|
||||
import org.libreplan.business.planner.entities.Dependency.Type;
|
||||
import org.libreplan.business.resources.daos.IResourcesSearcher;
|
||||
|
|
@ -622,6 +624,18 @@ public abstract class TaskElement extends BaseEntity {
|
|||
return "assigned";
|
||||
}
|
||||
|
||||
public Boolean belongsClosedProject() {
|
||||
EnumSet<OrderStatusEnum> CLOSED = EnumSet.of(OrderStatusEnum.CANCELLED,
|
||||
OrderStatusEnum.FINISHED, OrderStatusEnum.STORED);
|
||||
|
||||
Order order = getOrderElement().getOrder();
|
||||
if(CLOSED.contains(order.getState())) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public abstract boolean hasLimitedResourceAllocation();
|
||||
|
||||
public void removePredecessorsDayAssignmentsFor(Scenario scenario) {
|
||||
|
|
|
|||
|
|
@ -1107,6 +1107,11 @@ public class TaskElementAdapter {
|
|||
&& ((Task) taskElement).isManualAnyAllocation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean belongsClosedProject() {
|
||||
return taskElement.belongsClosedProject();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue