From adfa296873664782eb733604d07165b4a34db4d6 Mon Sep 17 00:00:00 2001 From: Susana Montes Pedreira Date: Wed, 4 Jul 2012 18:57:22 +0100 Subject: [PATCH] allows the limiting resource assignment when there are subcontractor progresses. FEA: ItEr76S04BugFixing --- .../planner/taskedition/TaskPropertiesController.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libreplan-webapp/src/main/java/org/libreplan/web/planner/taskedition/TaskPropertiesController.java b/libreplan-webapp/src/main/java/org/libreplan/web/planner/taskedition/TaskPropertiesController.java index b47927a4d..94bfe3309 100644 --- a/libreplan-webapp/src/main/java/org/libreplan/web/planner/taskedition/TaskPropertiesController.java +++ b/libreplan-webapp/src/main/java/org/libreplan/web/planner/taskedition/TaskPropertiesController.java @@ -339,11 +339,8 @@ public class TaskPropertiesController extends GenericForwardComposer { restoreOldState(); editTaskController.showNonPermitChangeResourceAllocationType(); } else { - if(newState.equals(ResourceAllocationTypeEnum.SUBCONTRACT) && checkCompatibleAllocation()){ - changeResourceAllocationType(oldState, newState); - editTaskController.selectAssignmentTab(lbResourceAllocationType - .getSelectedIndex() + 1); - }else{ + if(newState.equals(ResourceAllocationTypeEnum.SUBCONTRACT) + && !checkCompatibleAllocation()){ try { restoreOldState(); Messagebox.show(_("This resource allocation type is incompatible. The task has an associated order element which has a progress that is of type subcontractor. "), @@ -352,6 +349,9 @@ public class TaskPropertiesController extends GenericForwardComposer { // TODO Auto-generated catch block e.printStackTrace(); } + }else{ + changeResourceAllocationType(oldState,newState); + editTaskController.selectAssignmentTab(lbResourceAllocationType.getSelectedIndex() + 1); } } }