The following trigger prevents users from saving a task with Budgeted Time less than Actual Time:
SecuredTaskBean currentState = new SecuredTaskBean(task.getId(),task.getSecure()); if (currentState.getActualBudget()!=null) { if ((task.getBudget()==null && currentState.getBudget()!=null) || (task.getBudget()!=null && task.getBudget().compareTo(currentState.getActualBudget())<0)) throw new UserMessageException("Budgeted Time must be greater than Actual Time"); } return task;
Copyright (c) 2002-2006. All rights reserved.
|