Author: hansbak
Date: Thu Dec 27 02:36:01 2007 New Revision: 607033 URL: http://svn.apache.org/viewvc?rev=607033&view=rev Log: subprojects not shown on the subprojects tab of a project Modified: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListProjects.bsh ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml Modified: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListProjects.bsh URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListProjects.bsh?rev=607033&r1=607032&r2=607033&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListProjects.bsh (original) +++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ListProjects.bsh Thu Dec 27 02:36:01 2007 @@ -44,7 +44,8 @@ LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher"); fromDate = parameters.get("fromDate"); -projectId = parameters.get("projectId"); // if provided only give subprojects of a certain main project +projectId = parameters.get("projectId"); +subProjects = parameters.get("subProjects"); // if provided only give subprojects of a certain main project projectName = parameters.get("projectName"); projectId_op = parameters.get("projectId_op"); @@ -56,15 +57,22 @@ conditions.add(new EntityExpr("createdStamp", EntityOperator.GREATER_THAN_EQUAL_TO, fromDate + " 00:00:00.0")); } -if (!UtilValidate.isEmpty(projectId)) { - if(!UtilValidate.isEmpty(projectId_op)){ - if( projectId_op.equals("contains") || projectId_op.equals("like") ) { - conditions.add(new EntityExpr("workEffortId", EntityOperator.LIKE, "%"+projectId+"%")); - }else{ - conditions.add(new EntityExpr("workEffortId", checkCondition(projectId_op), projectId)); - } - } + +if (subProjects != null) { + conditions.add(new EntityExpr("workEffortParentId", EntityOperator.EQUALS, projectId)); + conditions.add(new EntityExpr("workEffortTypeId", EntityOperator.EQUALS, "PROJECT")); +} else { + if (!UtilValidate.isEmpty(projectId)) { + if(!UtilValidate.isEmpty(projectId_op)){ + if( projectId_op.equals("contains") || projectId_op.equals("like") ) { + conditions.add(new EntityExpr("workEffortId", EntityOperator.LIKE, "%"+projectId+"%")); + }else{ + conditions.add(new EntityExpr("workEffortId", checkCondition(projectId_op), projectId)); + } + } + } } + if (!UtilValidate.isEmpty(projectName)) { if(!UtilValidate.isEmpty(projectName_op)) { Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml?rev=607033&r1=607032&r2=607033&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml Thu Dec 27 02:36:01 2007 @@ -55,7 +55,7 @@ <menu-item name="tasks" title="${uiLabelMap.ProjectMgrTasks}"><link target="EditProjectTasks?projectId=${projectId}"/></menu-item> <menu-item name="parties" title="${uiLabelMap.ProjectMgrResources}"><link target="ListWorkEffortPartyAssigns?projectId=${projectId}"/></menu-item> <menu-item name="notes" title="${uiLabelMap.CommonNotes}"><link target="EditWorkEffortNotes?projectId=${projectId}"/></menu-item> - <menu-item name="subprojects" title="${uiLabelMap.ProjectMgrSubProjects}"><link target="ListSubProjects?projectId=${projectId}"/></menu-item> + <menu-item name="subprojects" title="${uiLabelMap.ProjectMgrSubProjects}"><link target="ListSubProjects?projectId=${projectId}&subProjects=true"/></menu-item> <menu-item name="billing" title="${uiLabelMap.ProjectMgrBilling}"><link target="projectBilling?projectId=${projectId}"/></menu-item> <!--menu-item name="treeDetails" title="${uiLabelMap.ProjectMgrTreeDetails}"><link target="ChildWorkEfforts?projectId=${projectId}&trail=${workEffortId}&workEffortTypeId=PROJECT&workEffortAssocTypeId=WORK_EFF_BREAKDOWN"/></menu-item--> </menu> |
Free forum by Nabble | Edit this page |