svn commit: r597977 - in /ofbiz/trunk/specialpurpose/projectmgr: script/org/ofbiz/project/ servicedef/ webapp/projectmgr/WEB-INF/ widget/ widget/forms/

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r597977 - in /ofbiz/trunk/specialpurpose/projectmgr: script/org/ofbiz/project/ servicedef/ webapp/projectmgr/WEB-INF/ widget/ widget/forms/

hansbak-2
Author: hansbak
Date: Sun Nov 25 04:31:45 2007
New Revision: 597977

URL: http://svn.apache.org/viewvc?rev=597977&view=rev
Log:
phase list now also get its dates and status from the tasks.

Modified:
    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/controller.xml
    ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml
    ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml
    ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml

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=597977&r1=597976&r2=597977&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml Sun Nov 25 04:31:45 2007
@@ -42,10 +42,8 @@
         <!-- loop through the related phases and tasks -->
         <get-related value-name="project" relation-name="ChildWorkEffort" list-name="phases"/>
         <iterate entry-name="phase" list-name="phases">
-            <log level="always" message="====processing phase: ${phase.workEffortName}"></log>
             <get-related value-name="phase" relation-name="ChildWorkEffort" list-name="tasks"/>
             <iterate entry-name="lowInfo" list-name="tasks">
-                <log level="always" message="====processing task: ${lowInfo.workEffortName}"></log>
                 <call-simple-method method-name="combineInfo"/>
             </iterate>
         </iterate>
@@ -62,49 +60,52 @@
         <!-- results -->
         <field-to-result field-name="highInfo" result-name="projectInfo"/>
         <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="getProjectPhase" short-description="get Project Phase information" login-required="true">
-        <!-- get the phase seq id -->
-        <entity-one entity-name="StatusItem" value-name="highSeq">
-            <field-map field-name="statusId" env-name="phase.currentStatusId"/>
-        </entity-one>
-        <set field="highInfo.sequenceId" from-field="highSeq.sequenceId"/>
-        
-        <entity-one entity-name="WorkEffort" value-name="phase">
-            <field-map field-name="workEffortId" env-name="parameters.phaseId"/>
-        </entity-one>
-        <set field="highInfo.phaseId" from-field="phase.worEffortId"/>
-        <set field="highInfo.phaseName" from-field="phase.worEffortName"/>
-        <set field="highInfo.phaseDescription" from-field="phase.description"/>
-        <set field="highInfo.priority" from-field="phase.priority"/>
-        <set field="highInfo.scopeEnumId" from-field="phase.scopeEnumId"/>
+    <simple-method method-name="getProjectPhaseList" short-description="get Project Phase information" login-required="true">
+        <if-empty field-name="parameters.projectId">
+            <return/>
+        </if-empty>
+        <entity-and entity-name="WorkEffort" list-name="phases">
+            <field-map field-name="workEffortParentId" env-name="parameters.projectId"/>
+        </entity-and>        
         
-        <!-- loop through the related tasks -->
-        <get-related value-name="phase" relation-name="ChildWorkEffort" list-name="tasks"/>
-        <iterate entry-name="lowInfo" list-name="tasks">
-            <call-simple-method method-name="combineInfo"/>
+        <iterate entry-name="phase" list-name="phases">
+            <!-- get the phase seq id -->
+            <entity-one entity-name="StatusItem" value-name="highSeq">
+                <field-map field-name="statusId" env-name="phase.currentStatusId"/>
+            </entity-one>
+            <clear-field field-name="highInfo"/>
+            <set field="highInfo.sequenceId" from-field="highSeq.sequenceId"/>
+            <set field="highInfo.phaseId" from-field="phase.workEffortId"/>
+            <set field="highInfo.phaseName" from-field="phase.workEffortName"/>
+            <set field="highInfo.phaseDescription" from-field="phase.description"/>
+            <set field="highInfo.priority" from-field="phase.priority"/>
+            <set field="highInfo.scopeEnumId" from-field="phase.scopeEnumId"/>
+            
+            <!-- loop through the related tasks -->
+            <get-related value-name="phase" relation-name="ChildWorkEffort" list-name="tasks"/>
+            <iterate entry-name="lowInfo" list-name="tasks">
+                <call-simple-method method-name="combineInfo"/>
+            </iterate>
+            
+            <!-- translate squenceId back into statusId -->
+            <entity-and entity-name="StatusItem" list-name="statusses">
+                <field-map field-name="sequenceId" env-name="highInfo.sequenceId"/>
+                <field-map field-name="statusTypeId" value="TASK_STATUS"/>
+            </entity-and>
+            <first-from-list entry-name="status" list-name="statusses"/>
+            <clear-field field-name="highInfo.sequenceId"/>
+            <set field="highInfo.statusId" from-field="status.statusId"/>
+            <field-to-list field-name="highInfo" list-name="phaseList"/>
         </iterate>
         
-        <!-- translate squenceId back into statusId -->
-        <entity-and entity-name="StatusItem" list-name="statusses">
-            <field-map field-name="sequenceId" env-name="highInfo.sequenceId"/>
-            <field-map field-name="statusTypeId" value="TASK_STATUS"/>
-        </entity-and>
-        <first-from-list entry-name="status" list-name="statusses"/>
-        <clear-field field-name="highInfo.sequenceId"/>
-        <set field="highInfo.statusId" from-field="status.statusId"/>
-
         <!-- results -->
-        <field-to-result field-name="highInfo" result-name="phaseInfo"/>
+        <field-to-result field-name="phaseList"/>
         <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="getProjectTask" short-description="get Project task information" login-required="true">
+    <simple-method method-name="getProjectTaskList" 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>
@@ -126,12 +127,10 @@
     <simple-method method-name="combineInfo" short-description="combine lower level status, dates of tasks.">
         <!-- in/output highInfo infoMap -->
         <!-- input lowInfo info map -->
-        <log level="always" message="========Lowinfo:${lowInfo} ===highInfo: ${highInfo}"></log>
         <!-- set the dates from the lower level tasks -->
         <if-not-empty field-name="lowInfo.estimatedStartDate">
             <if-empty field-name="highInfo.estimatedStartDate">
                 <set field="highInfo.estimatedStartDate" from-field="lowInfo.estimatedStartDate" />
-                <log level="always" message="======Setting: ${highInfo.estimatedStartDate} from ${lowInfo.estimatedStartDate}"></log>
                 <else>
                     <if-compare-field map-name="highInfo" to-map-name="lowInfo" field-name="estimatedStartDate" operator="less">
                         <set field="highInfo.estimatedStartDate" from-field="lowInfo.estimatedStartDate" />
@@ -170,7 +169,7 @@
             </if-empty>
         </if-not-empty>
         
-        <!-- get the status from the lowerlevel tasks follow the sequence in the StatusItem entity and us the lowest-->
+        <!-- get the status from the lowerlevel tasks follow the sequence in the StatusItem entity and use the lowest-->
         <entity-one entity-name="StatusItem" value-name="status">
             <field-map field-name="statusId" env-name="lowInfo.currentStatusId"/>
         </entity-one>

Modified: ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml?rev=597977&r1=597976&r2=597977&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml Sun Nov 25 04:31:45 2007
@@ -29,21 +29,18 @@
         <attribute name="projectInfo" type="Map" mode="OUT" optional="true"/>
     </service>
     
-    <service name="getProjectPhase" engine="simple"
-        location="org/ofbiz/project/ProjectServices.xml" invoke="getProjectPhase">
+    <service name="getProjectPhaseList" engine="simple"
+        location="org/ofbiz/project/ProjectServices.xml" invoke="getProjectPhaseList">
         <description>Get project phase information and related task info.</description>
         <attribute name="projectId" type="String" mode="INOUT" optional="true"/>
-        <attribute name="projectPhaseId" type="String" mode="INOUT" optional="true"/>
-        <attribute name="phaseInfo" type="Map" mode="OUT" optional="false"/>
+        <attribute name="phaseList" type="List" mode="OUT" optional="true"/>
     </service>
     
-    <service name="getProjectTask" engine="simple"
-        location="org/ofbiz/project/ProjectServices.xml" invoke="getProjectTask">
+    <service name="getProjectTaskList" engine="simple"
+        location="org/ofbiz/project/ProjectServices.xml" invoke="getProjectTaskList">
         <description>Get project task information and related timesheet info.</description>
         <attribute name="projectId" type="String" mode="INOUT" optional="true"/>
-        <attribute name="projectPhaseId" type="String" mode="INOUT" optional="true"/>
-        <attribute name="projectTaskId" type="String" mode="INOUT" optional="true"/>
-        <attribute name="taskInfo" type="Map" mode="OUT" optional="true"/>
+        <attribute name="taskList" type="List" mode="OUT" optional="true"/>
     </service>
     
 </services>

Modified: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml?rev=597977&r1=597976&r2=597977&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml Sun Nov 25 04:31:45 2007
@@ -121,6 +121,12 @@
         <response name="success" type="view" value="FindTask"/>
         <response name="error" type="view" value="FindTask"/>
     </request-map>
+    <request-map uri="updateProjectPhase">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updateWorkEffort"/>
+        <response name="success" type="view" value="FindPhase"/>
+        <response name="error" type="view" value="FindPhase"/>
+    </request-map>
     <request-map uri="deleteTask">
         <security https="true" auth="true"/>
         <event type="service" invoke="deleteWorkEffort"/>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml?rev=597977&r1=597976&r2=597977&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml Sun Nov 25 04:31:45 2007
@@ -344,13 +344,17 @@
                 <set field="titleProperty" value="PageTitleEditPhase"/>
                 <set field="tabButtonItem" value="phases"/>
                 <set field="labelTitleProperty" value="PageTitleFindPhase"/>
-                <set field="projectId" from-field="parameters.workEffortIdFrom"/>
-                <entity-and entity-name="WorkEffort" list-name="phases">
+                <set field="projectId" from-field="parameters.workEffortIdFrom"/>
+                <service service-name="getProjectPhaseList" result-map-name="result">
+                    <field-map field-name="projectId" env-name="projectId"/>
+                </service>
+                <set field="phases" from-field="result.phaseList"/>
+                <!--entity-and entity-name="WorkEffort" list-name="phases">
                     <field-map field-name="workEffortParentId" env-name="projectId"/>
                     <field-map field-name="workEffortTypeId" value="PHASE"/>
-                </entity-and>
+                </entity-and-->
             </actions>
-            <widgets>
+            <widgets>
                 <decorator-screen name="CommonProjectDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <section>                            

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml?rev=597977&r1=597976&r2=597977&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml Sun Nov 25 04:31:45 2007
@@ -175,24 +175,35 @@
         </field>
         <field name="submitButton" title="${uiLabelMap.CommonUpdate}"><submit button-type="button"/></field>
     </form>      
-    <form name="ListPhases" target="updatePhaseAndAssoc" title="" list-name="phases" type="list" separate-columns="true" paginate-target="FindPhase">
-        <row-actions>
-            <entity-one entity-name="StatusItem" value-name="currentStatus">
-                <field-map field-name="statusId" env-name="currentStatusId"/>
-            </entity-one>
-        </row-actions>
-        <field name="workEffortIdFrom"><hidden/></field>
-        <field name="workEffortIdTo" entry-name="workEffortId"><hidden/></field>
-        <field name="workEffortName" position="1" title="${uiLabelMap.CommonName}*"><text/></field>
-        <field name="currentStatusId">
-            <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" value="${currentStatusId}"/>
-                    <entity-order-by field-name="sequenceId"/>
-                </entity-options>
-            </drop-down>
-        </field>
-        <field name="description" title="${uiLabelMap.CommonDescription}"><text size="15"/></field>        
+    <form name="ListPhases" target="updateProjectPhase" title="" list-name="phases" type="list" separate-columns="true" paginate-target="FindPhase">
+        <field name="workEffortIdFrom"><hidden value="${parameters.workEffortIdFrom}"/></field>
+        <field name="phaseId" parameter-name="workEffortId"><hidden/></field>
+        <field name="phaseName" parameter-name="workEffortName" title="${uiLabelMap.CommonName}*"><text/></field>
+        <field name="statusId" title="${uiLabelMap.CommonStatus}"><display-entity entity-name="StatusItem" key-field-name="statusId"/></field>
+        <field name="priority" title="${uiLabelMap.CommonPriority}">
+            <drop-down allow-empty="true" current="selected">
+                <option key="1" description="1 (${uiLabelMap.WorkEffortPriorityHigh})"/>
+                <option key="2" description="2"/>
+                <option key="3" description="3"/>
+                <option key="4" description="4"/>
+                <option key="5" description="5"/>
+                <option key="6" description="6"/>
+                <option key="7" description="7"/>
+                <option key="8" description="8"/>
+                <option key="9" description="9 (${uiLabelMap.WorkEffortPriorityLow})"/>
+            </drop-down>
+        </field>
+        <field name="scopeEnumId" title="${uiLabelMap.ProjectMgrWorkEffortScopeEnumId}">
+            <drop-down allow-empty="false">
+                <entity-options entity-name="Enumeration" description="${description}" key-field-name="enumId">
+                    <entity-constraint name="enumTypeId" value="WORK_EFF_SCOPE"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="estimatedStartDate" title="${uiLabelMap.FormFieldTitle_estimatedStartDate}"><display description="${bsh:estimatedStartDate!=void?estimatedStartDate.toString().substring(0,10):&quot;&quot;;}"/></field>
+        <field name="estimatedCompletionDate" title="${uiLabelMap.FormFieldTitle_estimatedCompletionDate}"><display description="${bsh:estimatedCompletionDate!=void?estimatedCompletionDate.toString().substring(0,10):&quot;&quot;;}"/></field>
+        <field name="actualStartDate" title="${uiLabelMap.FormFieldTitle_actualStartDate}"><display description="${bsh:actualStartDate!=void?actualStartDate.toString().substring(0,10):&quot;&quot;;}"/></field>
+        <field name="actualCompletionDate" title="${uiLabelMap.FormFieldTitle_actualCompletionDate}"><display description="${bsh:actualCompletionDate!=void?actualCompletionDate.toString().substring(0,10):&quot;&quot;;}"/></field>
         <field name="submitButton" title="${uiLabelMap.CommonUpdate}"><submit button-type="button"/></field>
     </form>
     <form name="ListPhaseTaskInfo" type="list" list-name="phases">

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml?rev=597977&r1=597976&r2=597977&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml Sun Nov 25 04:31:45 2007
@@ -105,6 +105,26 @@
         <field name="currentStatusId"><hidden value="CAL_ACCEPTED"/></field>
         <field name="workEffortName" title="${uiLabelMap.CommonName}*" tooltip="${uiLabelMap.CommonRequired}"><text/></field>
         <field name="description" title="${uiLabelMap.CommonDescription}"><text/></field>
+        <field name="priority" title="${uiLabelMap.CommonPriority}">
+            <drop-down allow-empty="true" current="selected">
+                <option key="1" description="1 (${uiLabelMap.WorkEffortPriorityHigh})"/>
+                <option key="2" description="2"/>
+                <option key="3" description="3"/>
+                <option key="4" description="4"/>
+                <option key="5" description="5"/>
+                <option key="6" description="6"/>
+                <option key="7" description="7"/>
+                <option key="8" description="8"/>
+                <option key="9" description="9 (${uiLabelMap.WorkEffortPriorityLow})"/>
+            </drop-down>
+        </field>
+        <field name="scopeEnumId" title="${uiLabelMap.ProjectMgrWorkEffortScopeEnumId}">
+            <drop-down allow-empty="false">
+                <entity-options entity-name="Enumeration" description="${description}" key-field-name="enumId">
+                    <entity-constraint name="enumTypeId" value="WORK_EFF_SCOPE"/>
+                </entity-options>
+            </drop-down>
+        </field>
         <field name="save" title="${uiLabelMap.CommonSave}"><submit/></field>
     </form>
     <form name="AddProjectPhase" type="single" target="createProjectPhase">
@@ -114,6 +134,26 @@
         <field name="currentStatusId"><hidden value="CAL_ACCEPTED"/></field>
         <field name="workEffortName" title="${uiLabelMap.CommonName}*" tooltip="${uiLabelMap.CommonRequired}"><text/></field>
         <field name="description" title="${uiLabelMap.CommonDescription}"><text/></field>
+        <field name="priority" title="${uiLabelMap.CommonPriority}">
+            <drop-down allow-empty="true" current="selected">
+                <option key="1" description="1 (${uiLabelMap.WorkEffortPriorityHigh})"/>
+                <option key="2" description="2"/>
+                <option key="3" description="3"/>
+                <option key="4" description="4"/>
+                <option key="5" description="5"/>
+                <option key="6" description="6"/>
+                <option key="7" description="7"/>
+                <option key="8" description="8"/>
+                <option key="9" description="9 (${uiLabelMap.WorkEffortPriorityLow})"/>
+            </drop-down>
+        </field>
+        <field name="scopeEnumId" title="${uiLabelMap.ProjectMgrWorkEffortScopeEnumId}">
+            <drop-down allow-empty="false">
+                <entity-options entity-name="Enumeration" description="${description}" key-field-name="enumId">
+                    <entity-constraint name="enumTypeId" value="WORK_EFF_SCOPE"/>
+                </entity-options>
+            </drop-down>
+        </field>
         <field name="save" title="${uiLabelMap.CommonSave}"><submit/></field>
     </form>