Author: hansbak
Date: Fri Nov 30 21:55:59 2007 New Revision: 600050 URL: http://svn.apache.org/viewvc?rev=600050&view=rev Log: add planned and actual hours to projectoverview + some faults fixing Modified: ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.properties ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/getProjectId.bsh ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml Modified: ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.properties URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.properties?rev=600050&r1=600049&r2=600050&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.properties (original) +++ ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.properties Fri Nov 30 21:55:59 2007 @@ -48,8 +48,10 @@ PageTitleListPartyAssigns=Party Assigns PageTitleListProjectNotes=List Project Notes PageTitleListTaskNotes=List Task Notes -PageTitleTasksBefore=Tasks to be executed before the current task +PageTitleProjectInformation=Project Information PageTitleTasksAfter=Tasks to be executed after the current task +PageTitleTasksBefore=Tasks to be executed before the current task +PageTitleTaskInformation=Task information PageTitleUnassignedTask=Unassigned Task ProjectMgrActualHours=Actual Hours ProjectMgrCompanyName=Ofbiz Company @@ -72,6 +74,7 @@ ProjectMgrProjectCurrent=Current Project ProjectMgrPhaseDetails=Enter the Phase Details below ProjectMgrPhaseName=Phase Name +ProjectMgrPhaseList=List of project Phases ProjectMgrPhases=Phases ProjectMgrPhaseTaskList=List of Phases and Tasks ProjectMgrProjectName=Project Name @@ -88,6 +91,7 @@ ProjectMgrSubTasks=Sub Tasks ProjectMgrTaskCurrent=Current Task ProjectMgrTaskDetails=Enter the Task Details below +ProjectMgrTaskList=List of Project Tasks ProjectMgrTaskName=Task Name ProjectMgrTasks=Tasks ProjectMgrTaskList=List of Task Modified: ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml?rev=600050&r1=600049&r2=600050&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml Fri Nov 30 21:55:59 2007 @@ -1,26 +1,26 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. --> <simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd"> - + xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd"> + <simple-method method-name="getProject" short-description="get Project information" login-required="true"> <!-- get the phase seq id --> <if-empty field-name="parameters.projectId"> @@ -41,10 +41,6 @@ <set field="highInfo.sequenceId" from-field="highSeq.sequenceId"/> <set field="highInfo.statusDescription" from-field="highSeq.description"/> <set field="highInfo.createdDate" from-field="project.createdDate"/> - <set field="highInfo.estimatedStartDate" from-field="project.estimatedStartDate"/> - <set field="highInfo.estimatedCompletionDate" from-field="project.estimatedCompletionDate"/> - <set field="highInfo.actualStartDate" from-field="project.actualStartDate"/> - <set field="highInfo.actualCompletionDate" from-field="project.actualCompletionDate"/> <!-- loop through the related phases and tasks --> <get-related value-name="project" relation-name="ChildWorkEffort" list-name="phases"/> @@ -63,7 +59,9 @@ <first-from-list entry-name="status" list-name="statusses"/> <clear-field field-name="highInfo.sequenceId"/> <set field="highInfo.statusId" from-field="status.statusId"/> - + + <call-simple-method method-name="createDates"/> + <!-- results --> <field-to-result field-name="highInfo" result-name="projectInfo"/> <field-to-result field-name="parameters.projectId" result-name="projectId"/> @@ -75,6 +73,7 @@ </if-empty> <entity-and entity-name="WorkEffort" list-name="phases"> <field-map field-name="workEffortParentId" env-name="parameters.projectId"/> + <field-map field-name="workEffortTypeId" value="PHASE"/> </entity-and> <iterate entry-name="phase" list-name="phases"> @@ -96,6 +95,8 @@ <call-simple-method method-name="combineInfo"/> </iterate> + <!-- merge estimated and actual dates --> + <call-simple-method method-name="createDates"/> <!-- translate squenceId back into statusId --> <entity-and entity-name="StatusItem" list-name="statusses"> <field-map field-name="sequenceId" env-name="highInfo.sequenceId"/> @@ -112,24 +113,130 @@ <field-to-result field-name="parameters.projectId" result-name="projectId"/> </simple-method> - <simple-method method-name="getProjectTaskList" short-description="get Project task information" login-required="true"> + <simple-method method-name="getProjectTaskList" short-description="get Project Phase/task information" login-required="true"> + <if-empty field-name="parameters.projectId"> + <return/> + </if-empty> + <entity-and entity-name="ProjectAndPhaseAndTask" list-name="tasks"> + <field-map field-name="projectId" env-name="parameters.projectId"/> + </entity-and> + + <iterate entry-name="task" list-name="tasks"> + + <!-- merge estimated and actual dates --> + <if-empty field-name="savePhaseName"> + <set field="savePhaseName" from-field="task.phaseName"/> + <set field="highInfo.phaseName" from-field="task.phaseName"/> + <else> + <if-compare-field field-name="task.phaseName" operator="not-equals" to-field-name="savePhaseName"> + <set field="highInfo.phaseName" from-field="task.phaseName"/> + <set field="savePhaseName" from-field="task.phaseName"/> + </if-compare-field> + </else> + </if-empty> + <set field="highInfo.phaseId" from-field="task.phaseId"/> + <set field="highInfo.workEffortId" from-field="task.workEffortId"/> + <set field="highInfo.workEffortName" from-field="task.workEffortName"/> + <set field="highInfo.workEffortDescription" from-field="workEffortDescription"/> + <set field="highInfo.priority" from-field="task.priority"/> + <set field="highInfo.currentStatusId" from-field="task.currentStatusId"/> + <set field="highInfo.scopeEnumId" from-field="task.scopeEnumId"/> + <set field="highInfo.estimatedStartDate" from-field="task.estimatedStartDate"/> + <set field="highInfo.estimatedCompletionDate" from-field="task.estimatedCompletionDate"/> + <set field="highInfo.actualStartDate" from-field="task.actualStartDate"/> + <set field="highInfo.actualCompletionDate" from-field="task.actualCompletionDate"/> + <call-simple-method method-name="createDates"/> + <set field="lowInfo" from-field="task"/> + <call-simple-method method-name="getHours"/> + <field-to-list field-name="highInfo" list-name="taskList"/> + <clear-field field-name="highInfo"/> + </iterate> + + <!-- results --> + <field-to-result field-name="taskList"/> + <field-to-result field-name="parameters.projectId" result-name="projectId"/> + </simple-method> + + <simple-method method-name="getProjectTask" short-description="get Project task information" login-required="true"> <entity-one entity-name="WorkEffort" value-name="lowInfo"> <field-map field-name="workEffortId" env-name="parameters.taskId"/> </entity-one> <set field="highInfo.taskId" from-field="lowInfo.worEffortId"/> <set field="highInfo.taskName" from-field="lowInfo.workEffortName"/> - <set field="highInfo.tasDescription" from-field="lowInfo.description"/> + <set field="highInfo.taskDescription" from-field="lowInfo.description"/> <set field="highInfo.priority" from-field="lowInfo.priority"/> <set field="highInfo.scopeEnumId" from-field="lowInfo.scopeEnumId"/> <call-simple-method method-name="combineInfo"/> <clear-field field-name="highInfo.sequenceId"/> <set field="highInfo.statusId" from-field="lowInfo.currentStatusId"/> - <field-to-result field-name="highInfo"/> + <field-to-result field-name="highInfo" result-name="taskInfo"/> <field-to-result field-name="parameters.projectId" result-name="projectId"/> - <field-to-result field-name="parameters.phaseId" result-name="phaseIdId"/> <field-to-result field-name="parameters.taskId" result-name="taskId"/> </simple-method> + <simple-method method-name="getProjectsByParties" short-description="get Project information by party member" login-required="true"> + <!-- get the list of tasks optionaly selected for a party --> + <if-empty field-name="parameters.partyId"> + <set field="parameters.partyId" value="%"/> + </if-empty> + <if-empty field-name="parameters.projectId"> + <set field="parameters.projectId" value="%"/> + </if-empty> + <entity-condition entity-name="ProjectPartyAndPhaseAndTask" list-name="tasks"> + <condition-list combine="and"> + <condition-expr field-name="partyId" operator="like" env-name="parameters.partyId"/> + <condition-expr field-name="projectId" operator="like" env-name="parameters.projectId"/> + </condition-list> + <order-by field-name="projectId"/> + <order-by field-name="partyId"/> + </entity-condition> + <if-not-empty field-name="tasks"> + <iterate entry-name="task" list-name="tasks"> + <if> + <condition > + <and> + <not> + <if-empty field-name="projectParty"/> + </not> + <if-compare-field field-name="task.partyId" operator="not-equals" to-field-name="projectParty.partyId"/> + </and> + </condition> + <then> + <field-to-list field-name="projectParty" list-name="projectParties"/> + <clear-field field-name="projectParty"/> + </then> + </if> + + <if-empty field-name="projectParty"> + <set field="projectParty.partyId" from-field="task.partyId"/> + <entity-one entity-name="PartyNameView" value-name="partyNameView"> + <field-map field-name="partyId" env-name="task.partyId"/> + </entity-one> + <if-not-empty field-name="partyNameView"> + <set field="projectParty.partyName" value="${partyNameView.lastName},${partyNameView.firstName}${partyNameView.groupName}"/> + </if-not-empty> + <set field="projectParty.roleTypeId" from-field="task.roleTypeId"/> + <set field="projectParty.fromDate" from-field="task.fromDate"/> + <set field="projectParty.thruDate" from-field="task.thruDate"/> + </if-empty> + + <!-- get the planned hours --> + <set field="lowInfo" from-field="task"/> + <set field="hoursPartyId" from-field="task.partyId"/> + <call-simple-method method-name="getHours"/> + <set field="projectParty.plannedHours" from-field="highInfo.plannedHours"/> + <set field="projectParty.actualHours" from-field="highInfo.actualHours"/> + + </iterate> + <if-not-empty field-name="projectParty"> + <field-to-list field-name="projectParty" list-name="projectParties"/> + </if-not-empty> + <if-not-empty field-name="projectParties"> + <field-to-result field-name="projectParties"/> + </if-not-empty> + </if-not-empty> + </simple-method> + <!-- Internal functions --> <simple-method method-name="combineInfo" short-description="combine lower level status, dates of tasks."> <!-- in/output highInfo infoMap --> @@ -189,7 +296,17 @@ </else> </if-empty> - <!-- add the extimated hours together --> + <!-- add the estimated/planned hours together --> + <call-simple-method method-name="getHours"/> + + </simple-method> + + <simple-method method-name="getHours" short-description="get the planned and estimated hours for a task"> + + <!-- input is 'lowInfo' map output is 'highInfo map --> + <!-- hoursPartyId: if provided only the hours of that party --> + + <!-- add the estimated hours together --> <get-related value-name="lowInfo" relation-name="WorkEffortSkillStandard" list-name="estimates"/> <iterate entry-name="estimate" list-name="estimates"> <if-not-empty field-name="estimate.estimatedDuration"> @@ -204,14 +321,43 @@ <get-related value-name="lowInfo" relation-name="TimeEntry" list-name="actuals"/> <iterate entry-name="actual" list-name="actuals"> <if-not-empty field-name="actual.hours"> - <calculate field-name="highInfo.actualHours"> - <calcop operator="get" field-name="highInfo.actualHours"/> - <calcop operator="add" field-name="actual.hours"></calcop> - </calculate> + <if> + <condition> + <or> + <if-empty field-name="hoursPartyId"/> + <and> + <not><if-empty field-name="hoursPartyId"/></not> + <if-compare-field field-name="actuals.partyId" operator="equals" to-field-name="hoursPartyId"/> + </and> + </or> + </condition> + <then> + <calculate field-name="highInfo.actualHours"> + <calcop operator="get" field-name="highInfo.actualHours"/> + <calcop operator="add" field-name="actual.hours"></calcop> + </calculate> + </then> + </if> </if-not-empty> </iterate> - </simple-method> - + <simple-method method-name="createDates" short-description="merge the estimated and actual dates"> + + <!-- input/output is 'highInfo map --> + + <!-- create dates taking the last known one to save space on the list --> + <if-not-empty field-name="highInfo.actualStartDate"> + <set field="highInfo.startDate" from-field="highInfo.actualStartDate"/> + <else> + <set field="highInfo.startDate" from-field="highInfo.estimatedStartDate"/> + </else> + </if-not-empty> + <if-not-empty field-name="highInfo.actualCompletionDate"> + <set field="highInfo.completionDate" from-field="highInfo.actualCompletionDate"/> + <else> + <set field="highInfo.completionDate" from-field="highInfo.estimatedCompletionDate"/> + </else> + </if-not-empty> + </simple-method> </simple-methods> Modified: ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml?rev=600050&r1=600049&r2=600050&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml Fri Nov 30 21:55:59 2007 @@ -26,7 +26,7 @@ location="org/ofbiz/project/ProjectServices.xml" invoke="getProject"> <description>Get project information and realated phase and task info.</description> <attribute name="projectId" type="String" mode="INOUT" optional="true"/> - <attribute name="projectInfo" type="Map" mode="OUT" optional="true"/> + <attribute name="projectInfo" type="java.util.Map" mode="OUT" optional="true"/> </service> <service name="getProjectPhaseList" engine="simple" @@ -38,9 +38,25 @@ <service name="getProjectTaskList" engine="simple" location="org/ofbiz/project/ProjectServices.xml" invoke="getProjectTaskList"> - <description>Get project task information and related timesheet info.</description> + <description>Get project phase information and related task info.</description> <attribute name="projectId" type="String" mode="INOUT" optional="true"/> <attribute name="taskList" type="List" mode="OUT" optional="true"/> + </service> + + <service name="getProjectTask" engine="simple" + location="org/ofbiz/project/ProjectServices.xml" invoke="getProjectTask"> + <description>Get project task information and related timesheet info.</description> + <attribute name="taskId" type="String" mode="INOUT" optional="true"/> + <attribute name="projectId" type="String" mode="OUT" optional="true"/> + <attribute name="taskInfo" type="Map" mode="OUT" optional="true"/> + </service> + + <service name="getProjectsByParties" engine="simple" + location="org/ofbiz/project/ProjectServices.xml" invoke="getProjectsByParties"> + <description>Get project information by party</description> + <attribute name="projectId" type="String" mode="INOUT" optional="true"/> + <attribute name="partyId" type="String" mode="INOUT" optional="true"/> + <attribute name="projectParties" type="List" mode="OUT" optional="true"/> </service> </services> Modified: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/getProjectId.bsh URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/getProjectId.bsh?rev=600050&r1=600049&r2=600050&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/getProjectId.bsh (original) +++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/getProjectId.bsh Fri Nov 30 21:55:59 2007 @@ -23,12 +23,12 @@ import org.ofbiz.base.util.*; import org.ofbiz.base.util.UtilMisc; import javolution.util.FastMap; - +Debug.logInfo("==========workEffortId:" + parameters.get("workEffortId"),""); if (parameters.get("workEffortId") != null) { workEffortId = parameters.get("workEffortId"); - project = delegator.findByAnd("ProjectAndPhaseAndTask", UtilMisc.toMap("workEffortId", workEffortId)); - if (UtilValidate.isNotEmpty(project)) { - context.put("projectId", project.get(0).getString("projectId")); - context.put("projectName", project.get(0).getString("projectName")); + projects = delegator.findByAnd("ProjectAndPhaseAndTask", UtilMisc.toMap("workEffortId", workEffortId)); + if (UtilValidate.isNotEmpty(projects)) { + context.put("projectId", projects.get(0).getString("projectId")); + context.put("projectName", projects.get(0).getString("projectName")); } } Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml?rev=600050&r1=600049&r2=600050&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml Fri Nov 30 21:55:59 2007 @@ -98,7 +98,6 @@ <section> <actions> <entity-one entity-name="WorkEffort" value-name="workEffort"/> - <script location="component://projectmgr/webapp/projectmgr/WEB-INF/actions/getProjectId.bsh"/> </actions> <widgets> <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml?rev=600050&r1=600049&r2=600050&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml Fri Nov 30 21:55:59 2007 @@ -19,7 +19,7 @@ --> <screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd"> + xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd"> <screen name="ListSubProjects"> <section> <actions> @@ -479,26 +479,26 @@ <section> <actions> <set field="tabButtonItem" value="projectView"/> - <set field="workEffortId" from-field="parameters.projectId"/> - <set field="projectId" from-field="parameters.projectId"/> - <entity-one entity-name="WorkEffort" value-name="project"/> + <set field="projectId" from-field="parameters.projectId" default-value="parameters.workEffortId"/> + <service service-name="getProject" result-map-name="result"> + <field-map field-name="projectId" env-name="projectId"/> + </service> + <set field="project" from-field="result.projectInfo"/> </actions> <widgets> <decorator-screen name="CommonProjectDecorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> <section> - <condition> - <not><if-empty field-name="project"/></not> - </condition> <widgets> <container style="lefthalf"> <container style="screenlet"> - <container style="screenlet-title-bar"><label style="boxhead">${uiLabelMap.PageTitleEditSubProject}</label></container> + <container style="screenlet-title-bar"><label style="boxhead" text="${uiLabelMap.PageTitleProjectInformation}"/></container> <container style="screenlet-body"> <include-form name="ProjectInfo" location="component://projectmgr/widget/forms/ProjectForms.xml"/> </container> </container> - <include-screen name="PhasesTasksInfo"/> + <include-screen name="PhasesInfo"/> + <include-screen name="TasksInfo"/> </container> <container style="righthalf"> <include-screen name="SubProjectsInfo"/> @@ -540,30 +540,53 @@ </widgets> </section> </screen> - <screen name="PhasesTasksInfo"> - <section> - <actions> - <entity-and entity-name="ProjectAndPhaseAndTask" list-name="phases"> - <field-map field-name="projectId" env-name="parameters.projectId"/> - </entity-and> - </actions> - <widgets> - <container style="screenlet"> - <container style="screenlet-title-bar"> - <label style="boxhead" text="">${uiLabelMap.ProjectMgrPhaseTaskList}</label> - </container> + <screen name="PhasesInfo"> + <section> + <actions> + <service service-name="getProjectPhaseList" result-map-name="result"> + <field-map field-name="projectId" env-name="projectId"/> + </service> + <set field="phases" from-field="result.phaseList"/> + </actions> + <widgets> + <container style="screenlet"> + <container style="screenlet-title-bar"> + <label style="boxhead" text="">${uiLabelMap.ProjectMgrPhaseList}</label> + </container> <container style="screenlet-body"> - <include-form name="ListPhaseTaskInfo" location="component://projectmgr/widget/forms/ProjectForms.xml"/> - </container> - </container> - </widgets> - </section> - </screen> + <include-form name="ListPhaseInfo" location="component://projectmgr/widget/forms/ProjectForms.xml"/> + </container> + </container> + </widgets> + </section> + </screen> + <screen name="TasksInfo"> + <section> + <actions> + <service service-name="getProjectTaskList" result-map-name="result"> + <field-map field-name="projectId" env-name="projectId"/> + </service> + <set field="tasks" from-field="result.taskList"/> + </actions> + <widgets> + <container style="screenlet"> + <container style="screenlet-title-bar"> + <label style="boxhead" text="">${uiLabelMap.ProjectMgrTaskList}</label> + </container> + <container style="screenlet-body"> + <include-form name="ListTaskInfo" location="component://projectmgr/widget/forms/ProjectForms.xml"/> + </container> + </container> + </widgets> + </section> + </screen> <screen name="PartiesInfo"> <section> - <actions> - <set field="workEffortId" from-field="parameters.workEffortId"/> - <script location="component://projectmgr/webapp/projectmgr/WEB-INF/actions/AssociatedParties.bsh"/> + <actions> + <service service-name="getProjectsByParties" result-map-name="result"> + <field-map field-name="projectId" env-name="projectId"/> + </service> + <set field="parties" from-field="result.projectParties"/> </actions> <widgets> <container style="screenlet"> @@ -571,7 +594,7 @@ <label style="boxhead" text="">${uiLabelMap.ProjectMgrProjectTeam}</label> </container> <container style="screenlet-body"> - <include-form name="ListAssociatedParties" location="component://projectmgr/widget/forms/ProjectForms.xml"/> + <include-form name="ListProjectParties" location="component://projectmgr/widget/forms/ProjectForms.xml"/> </container> </container> </widgets> Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml?rev=600050&r1=600049&r2=600050&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml Fri Nov 30 21:55:59 2007 @@ -119,13 +119,11 @@ <set field="titleProperty" value="PageTitleEditTaskList"/> <set field="tabButtonItem" value="edittask"/> <set field="labelTitleProperty" value="PageTitleEditTaskList"/> - <set field="donePage" from-field="parameters.DONE_PAGE" default-value="/workeffort/control/Dependencies"/> <set field="workEffortId" from-field="parameters.workEffortId"/> - <set field="workEffortAssocTypeId" from-field="parameters.workEffortAssocTypeId"/> - <entity-one entity-name="WorkEffort" value-name="task"/> + <entity-one entity-name="WorkEffort" value-name="task"/> + <script location="component://projectmgr/webapp/projectmgr/WEB-INF/actions/getProjectId.bsh"/> </actions> - <widgets> - + <widgets> <decorator-screen name="CommonTaskDecorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> <section> @@ -281,7 +279,10 @@ <set field="tabButtonItem" value="taskView"/> <set field="workEffortId" from-field="parameters.workEffortId"/> <set field="projectId" from-field="parameters.workEffortId"/> - <entity-one entity-name="WorkEffort" value-name="task"/> + <service service-name="getProjectTask" result-map-name="result"> + <field-map field-name="taskId" env-name="workEffortId"/> + </service> + <set field="task" from-field="result.taskInfo"/> </actions> <widgets> <decorator-screen name="CommonTaskDecorator" location="${parameters.mainDecoratorLocation}"> @@ -290,9 +291,14 @@ <condition> <not><if-empty field-name="task"/></not> </condition> - <widgets> + <widgets> <container style="lefthalf"> - <include-screen name="TaskInfo"/> + <container style="screenlet"> + <container style="screenlet-title-bar"><label style="boxhead" text="${uiLabelMap.PageTitleTaskInformation}"/></container> + <container style="screenlet-body"> + <include-form name="TaskInfo" location="component://projectmgr/widget/forms/TaskForms.xml"/> + </container> + </container> </container> <container style="righthalf"> <include-screen name="NoteInfo"/> Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml?rev=600050&r1=600049&r2=600050&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml Fri Nov 30 21:55:59 2007 @@ -17,7 +17,8 @@ specific language governing permissions and limitations under the License. --> -<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> +<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd"> <form name="EditProject" type="single" target="updateProject" default-map-name="project"> <alt-target use-when="project==null" target="createProject"/> <field name="projectId"><hidden value="${parameters.projectId}"/></field> @@ -77,21 +78,13 @@ </field> <field name="statusDescription" title="${uiLabelMap.CommonStatus}"><display/></field> <field name="priority" title="${uiLabelMap.CommonPriority}"><display type="date"/></field> - <field name="estimatedStartDate" title="${uiLabelMap.WorkEffortEstimatedStartDate}"><display type="date"/></field> - <field name="estimatedCompletionDate" title="${uiLabelMap.WorkEffortEstimatedCompletionDate}"><display type="date"/></field> - <field name="actualStartDate" title="${uiLabelMap.WorkEffortActualStartDate}"><display type="date"/></field> - <field name="actualCompletionDate" title="${uiLabelMap.WorkEffortActualCompletionDate}"><display type="date"/></field> + <field name="startDate" title="${uiLabelMap.WorkEffortStartDate}"><display type="date"/></field> + <field name="completionDate" title="${uiLabelMap.WorkEffortCompletionDate}"><display type="date"/></field> <field name="plannedHours"><display/></field> <field name="actualHours"><display/></field> <field name="createdDate"><display type="date"/></field> </form> <form name="ProjectInfo" type="single" default-map-name="project" paginate-target="FindProject"> - <actions> - <service service-name="getProject" result-map-name="result"> - <field-map field-name="projectId" env-name="parameters.projectId"/> - </service> - <set field="project" from-field="result.projectInfo"/> - </actions> <field name="projectName" title="${uiLabelMap.ProjectMgrProjectName}"><display/></field> <field name="statusDescription" title="${uiLabelMap.CommonStatus}"><display/></field> <field name="priority" title="${uiLabelMap.CommonPriority}"><display type="date"/></field> @@ -241,28 +234,35 @@ <field name="actualCompletionDate" title="${uiLabelMap.FormFieldTitle_actualCompletionDate}"><display type="date"/></field> <field name="submitButton" title="${uiLabelMap.CommonUpdate}"><submit button-type="button"/></field> </form> - <form name="ListPhaseTaskInfo" type="list" list-name="phases"> - <field name="projectId"><hidden value="parameters.worEffortIdFrom"/></field> - <field name="Phase"><hyperlink target="FindPhase?projectId=${projectId}" description="${phaseName}"/></field> - <field name="Task"><hyperlink target="EditTask?workEffortId=${workEffortId}" description="${workEffortName}"/></field> + <form name="ListPhaseInfo" type="list" list-name="phases"> + <field name="projectId"><hidden value="parameters.projectId"/></field> + <field name="phase"><hyperlink target="FindPhase?projectId=${projectId}" description="${phaseName}"/></field> + <field name="statusId"><display-entity entity-name="StatusItem" key-field-name="statusId" description="${description}"/></field> + <field name="startDate"><display/></field> + <field name="completionDate"><display/></field> + <field name="plannedHours"><display/></field> + <field name="actualHours"><display/></field> + </form> + <form name="ListTaskInfo" type="list" list-name="tasks"> + <field name="projectId"><hidden value="parameters.projectId"/></field> + <field name="phase"><hyperlink target="FindPhase?projectId=${projectId}" description="${phaseName}"/></field> + <field name="task"><hyperlink target="taskView?workEffortId=${workEffortId}" description="${workEffortName}"/></field> <field name="currentStatusId"><display-entity entity-name="StatusItem" key-field-name="statusId" description="${description}"/></field> - <field name="estimatedStartDate"><display/></field> - <field name="estimatedCompletionDate"><display/></field> - <field name="actualStartDate"><display/></field> - <field name="actualCompletionDate"><display/></field> - </form> - <form name="ListAssociatedParties" type="list" list-name="associatedParties"> - <field name="workEffortId" title="${uiLabelMap.ProjectMgrWorkEffortId}" widget-style="buttontext"> - <hyperlink also-hidden="false" description="${workEffortId}" target="EditProject?workEffortId=${workEffortId}"/> - </field> - <field name="partyId" title="${uiLabelMap.PartyPartyId}"> - <display-entity entity-name="PartyNameView" description="${firstName} ${middleName} ${lastName}"> - <sub-hyperlink target="/partymgr/control/viewprofile?partyId=${partyId}" target-type="inter-app" description="${partyId}" link-style="buttontext"/> - </display-entity> + <field name="startDate"><display/></field> + <field name="completionDate"><display/></field> + <field name="plannedHours"><display/></field> + <field name="actualHours"><display/></field> + </form> + <form name="ListProjectParties" type="list" list-name="parties"> + <field name="projectId"><hidden/></field> + <field name="partyName" title="${uiLabelMap.CommonName}"> + <hyperlink target="/partymgr/control/viewprofile?partyId=${partyId}" target-type="inter-app" description="${partyName}"/> </field> <field name="roleTypeId" title="${uiLabelMap.ProjectMgrPartyRoleTypeId}"><display-entity entity-name="RoleType" description="${description}"/></field> - <field name="fromDate" title="${uiLabelMap.CommonFromDate}"><display/></field> - <field name="thruDate" title="${uiLabelMap.CommonThruDate}"><display/></field> + <field name="fromDate" title="${uiLabelMap.CommonFromDate}"><display type="date"/></field> + <field name="thruDate" title="${uiLabelMap.CommonThruDate}"><display type="date"/></field> + <field name="plannedHours"><display/></field> + <field name="actualHours"><display/></field> </form> <form name="ListProjectSkills" type="list" target="updateProjectSkillStandard" list-name="workEffortSkillStandardList" paginate-target="EditProjectSkills"> <field name="workEffortId" title="${uiLabelMap.ProjectMgrWorkEffortId}"> Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml?rev=600050&r1=600049&r2=600050&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml Fri Nov 30 21:55:59 2007 @@ -27,7 +27,7 @@ <field-map field-name="statusId" env-name="task.statusId"/> </entity-one> </actions> - <alt-target use-when="projectId!=null" target="createProjectTaskOrPhase"/> + <alt-target use-when="headerItem=="projects"" target="createProjectTaskOrPhase"/> <alt-target use-when="task==null&&projectId==null" target="createTask"/> <field name="projectId"><hidden value="${parameters.projectId}"/></field> <field name="DONE_PAGE"><hidden value="${donePage}"/></field> @@ -36,7 +36,7 @@ <field use-when="task==null" entry-name="dummy" name="workEffortName" title="${uiLabelMap.ProjectMgrTaskName}*" tooltip="${uiLabelMap.CommonRequired}"><text/></field> <field use-when="task!=null&&workEffortId!=null" name="workEffortName" title="${uiLabelMap.ProjectMgrTaskName}*"><text/></field> <field name="description" title="${uiLabelMap.CommonDescription}"><text/></field> - <field use-when="task!=null" name="statusId" title="${uiLabelMap.CommonStatus}"> + <field use-when="task!=null" name="statusId" parameter-name="currentStatusId" title="${uiLabelMap.CommonStatus}"> <drop-down allow-empty="false" current-description="${currentStatus.description}"> <entity-options entity-name="StatusValidChangeToDetail" key-field-name="statusIdTo" description="${transitionName} (${description})"> <entity-constraint name="statusId" env-name="task.currentStatusId"/> @@ -161,7 +161,7 @@ </form> <form name="ListTasks" type="list" list-name="tasks" paginate-target="Dependencies"> <field name="workEffortId" title="${uiLabelMap.ProjectMgrTaskName}" widget-style="buttontext"> - <hyperlink also-hidden="false" description="${workEffortName} [${workEffortId}]" target="EditTask?workEffortId=${workEffortId}"/> + <hyperlink also-hidden="false" description="${workEffortName} [${workEffortId}]" target="taskView?workEffortId=${workEffortId}"/> </field> <field name="projectName" title="${uiLabelMap.ProjectMgrProjectName}"><hyperlink target="projectView?projectId=${projectId}" description="${projectName}[${projectId}]"/></field> <field name="currentStatusId"><display-entity entity-name="StatusItem" key-field-name="statusId"/></field> @@ -251,4 +251,17 @@ </field> </form> <form name="AddTaskNote" extends="AddWorkEffortNote" extends-resource="component://workeffort/widget/WorkEffortForms.xml" type="single" target="createTaskNote" title=""></form> + <form name="TaskInfo" type="single" default-map-name="task"> + <field name="taskName" title="${uiLabelMap.ProjectMgrTaskName}"><display/></field> + <field name="taskDescription" title="${uiLabelMap.CommonDescription}"><display/></field> + <field name="statusDescription" title="${uiLabelMap.CommonStatus}"><display-entity entity-name="StatusItem" key-field-name="statusId"></display-entity>/></field> + <field name="priority" title="${uiLabelMap.CommonPriority}"><display type="date"/></field> + <field name="estimatedStartDate" title="${uiLabelMap.WorkEffortEstimatedStartDate}"><display type="date"/></field> + <field name="estimatedCompletionDate" title="${uiLabelMap.WorkEffortEstimatedCompletionDate}"><display type="date"/></field> + <field name="actualStartDate" title="${uiLabelMap.WorkEffortActualStartDate}"><display type="date"/></field> + <field name="actualCompletionDate" title="${uiLabelMap.WorkEffortActualCompletionDate}"><display type="date"/></field> + <field name="plannedHours"><display/></field> + <field name="actualHours"><display/></field> + <field name="createdDate"><display type="date"/></field> + </form> </forms> |
Free forum by Nabble | Edit this page |