svn commit: r605459 - in /ofbiz/trunk/specialpurpose/projectmgr: config/ 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: r605459 - in /ofbiz/trunk/specialpurpose/projectmgr: config/ script/org/ofbiz/project/ servicedef/ webapp/projectmgr/WEB-INF/ widget/ widget/forms/

hansbak-2
Author: hansbak
Date: Wed Dec 19 00:14:59 2007
New Revision: 605459

URL: http://svn.apache.org/viewvc?rev=605459&view=rev
Log:
a first version of the myTask screen to assign and reassign logged on person tasks. Als some fault 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/controller.xml
    ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml
    ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml
    ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml
    ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml

Modified: ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.properties?rev=605459&r1=605458&r2=605459&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.properties (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.properties Wed Dec 19 00:14:59 2007
@@ -57,10 +57,14 @@
 PageTitleProjectInformation=Project Information
 PageTitleRequestList=Request List
 PageTitleTasksAfter=Tasks to be executed after the current task
+PageTitleTaskAssignedToMe=Tasks Assigned to me.
 PageTitleTasksBefore=Tasks to be executed before the current task
 PageTitleTaskInformation=Task information
 PageTitleUnassignedTask=Unassigned Task
 ProjectMgrActualHours=Actual Hours
+ProjectMgrAddNewTask=Add a new task to one of my projects.
+ProjectMgrAssignATaskToMe=Assign an existing Task to me.
+ProjectMgrAssignMyTaskToSomebodyElse=Assign My Task To Somebody Else.
 ProjectMgrSchedule=Schedule
 ProjectMgrCompanyName=Ofbiz Company
 ProjectMgrCompanySubtitle=Project
@@ -75,6 +79,7 @@
 ProjectMgrEstimatedNumPeople=Estimated People
 ProjectMgrFilterOn=Filter on
 ProjectMgrGanttChart=Gantt Chart
+ProjectMgrMyRoleForThisTask=My Role For This Task
 ProjectMgrNewProject=New Project
 ProjectMgrNewSubProject=New Sub Project
 ProjectMgrNewSubTask=New Sub 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=605459&r1=605458&r2=605459&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml Wed Dec 19 00:14:59 2007
@@ -27,10 +27,11 @@
                 - - - - - - - - - - - - -
                 
                 Assumptions for tasks and resources
-                1. a workday has 8 hours
-                2. a workweek has 40 hours and 5 days
-                3. The default order of the Tasks is by name
-                4. The default order of the tasks can be modified by the priority
+                1. a workday has 8 hours.
+                2. a workweek has 40 hours and 5 days.
+                3. The default order of the Tasks is by name.
+                4. The default order of the tasks can be modified by the priority.
+                5. The default order can be changed by the workeffortassociation.
                 
                 The steps of the program are:
                 1. read all tasks into a list with the following fields:
@@ -447,16 +448,16 @@
         <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.taskId" from-field="lowInfo.workEffortId"/>
         <set field="highInfo.taskName" from-field="lowInfo.workEffortName"/>
         <set field="highInfo.taskDescription" from-field="lowInfo.description"/>
         <set field="highInfo.scopeEnumId" from-field="lowInfo.scopeEnumId"/>
         <call-simple-method method-name="combineInfo"/>
+        <call-simple-method method-name="getHours"/>
         <clear-field field-name="highInfo.sequenceId"/>
         <set field="highInfo.statusId" from-field="lowInfo.currentStatusId"/>
         <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.taskId" result-name="taskId"/>        
+        <call-simple-method method-name="getProjectIdAndName"/>
     </simple-method>
 
     <simple-method method-name="getProjectsByParties" short-description="get Project information by party member" login-required="true">
@@ -662,19 +663,24 @@
         <call-simple-method method-name="getHours"/>
     </simple-method>
     
-    <simple-method method-name="getHours" short-description="get the planned and estimated hours for a task">
+    <simple-method method-name="getHours"
+        short-description="get the planned and estimated hours for a task and add to the highInfo map">
         
         <!-- input is 'lowInfo' map output is 'highInfo map -->
         <!-- hoursPartyId: if provided only the hours of that party -->
-        
         <!-- add the planned 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">
-                <calculate field-name="highInfo.plannedHours">
-                    <calcop operator="get" field-name="highInfo.hours"></calcop>
-                    <calcop operator="add" field-name="estimate.estimatedDuration"/>
-                </calculate>
+                <if-not-empty field-name="highInfo.plannedHours">
+                    <calculate field-name="highInfo.plannedHours">
+                        <calcop operator="get" field-name="highInfo.plannedHours"></calcop>
+                        <calcop operator="add" field-name="estimate.estimatedDuration"/>
+                    </calculate>
+                    <else>
+                        <set field="highInfo.plannedHours" from-field="estimate.estimatedDuration"/>
+                    </else>
+                </if-not-empty>
             </if-not-empty>
         </iterate>
         
@@ -686,18 +692,23 @@
                 <if>
                     <condition>
                         <or>
-                            <if-empty field-name="hoursPartyId"/>
+                            <if-empty field-name="parameters.hoursPartyId"/>
                             <and>
-                                <not><if-empty field-name="hoursPartyId"/></not>
-                                <if-compare-field field-name="timeSheet.partyId" operator="equals" to-field-name="hoursPartyId"/>
+                                <not><if-empty field-name="parameters.hoursPartyId"/></not>
+                                <if-compare-field field-name="timesheet.partyId" operator="equals" to-field-name="parameters.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>
+                        <if-not-empty field-name="highInfo.actualHours">
+                            <calculate field-name="highInfo.actualHours">
+                                <calcop operator="get" field-name="highInfo.actualHours"/>
+                                <calcop operator="add" field-name="actual.hours"></calcop>
+                            </calculate>
+                            <else>
+                                <set field="highInfo.actualHours" from-field="actual.hours"/>
+                            </else>                            
+                        </if-not-empty>
                     </then>
                 </if>
             </if-not-empty>

Modified: ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml?rev=605459&r1=605458&r2=605459&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml Wed Dec 19 00:14:59 2007
@@ -43,7 +43,7 @@
         <attribute name="projectInfo" type="java.util.Map" mode="OUT" optional="true"/>
     </service>
     
-    <service name="createProject" engine="simple"
+    <service name="createProject" engine="simple" default-entity-name="WorkEffort"
         location="org/ofbiz/project/ProjectServices.xml" invoke="createProject">
         <description>Copy a project planning from a template.</description>
         <permission-service service-name="workEffortGenericPermission" main-action="CREATE"/>
@@ -104,8 +104,10 @@
     <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="hoursPartyId" type="String" mode="IN" optional="true"/>
         <attribute name="taskId" type="String" mode="INOUT" optional="true"/>
         <attribute name="projectId" type="String" mode="OUT" optional="true"/>
+        <attribute name="projectName" type="String" mode="OUT" optional="true"/>
         <attribute name="taskInfo" type="Map" mode="OUT" optional="true"/>
     </service>
     

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=605459&r1=605458&r2=605459&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml Wed Dec 19 00:14:59 2007
@@ -143,12 +143,30 @@
         <response name="success" type="view" value="EditTaskPartyAssigns"/>
         <response name="error" type="view" value="EditTaskPartyAssigns"/>
     </request-map>
+    <request-map uri="assignPartyToWorkEffort">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="assignPartyToWorkEffort"/>
+        <response name="success" type="view" value="MyTasks"/>
+        <response name="error" type="view" value="MyTasks"/>
+    </request-map>
+    <request-map uri="addMyTask">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="assignPartyToWorkEffort"/>
+        <response name="success" type="view" value="MyTasks"/>
+        <response name="error" type="view" value="MyTasks"/>
+    </request-map>
     <request-map uri="updateTaskPartyAssign">
         <security https="true" auth="true"/>
         <event type="service" invoke="updatePartyToWorkEffortAssignment"/>
         <response name="success" type="view" value="EditTaskPartyAssigns"/>
         <response name="error" type="view" value="EditTaskPartyAssigns"/>
     </request-map>
+    <request-map uri="updateMyTasks">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updatePartyToWorkEffortAssignment"/>
+        <response name="success" type="view" value="MyTasks"/>
+        <response name="error" type="view" value="MyTasks"/>
+    </request-map>
     <request-map uri="deleteTaskPartyAssign">
         <security https="true" auth="true"/>
         <event type="service" invoke="deletePartyToWorkEffortAssignment"/>
@@ -160,6 +178,12 @@
         <event type="service" invoke="createWorkEffort"/>
         <response name="success" type="view" value="EditTask"/>
         <response name="error" type="view" value="EditTask"/>
+    </request-map>
+    <request-map uri="createMyTask">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createWorkEffortAndPartyAssign"/>
+        <response name="success" type="view" value="MyTasks"/>
+        <response name="error" type="view" value="MyTasks"/>
     </request-map>
     <request-map uri="createProjectTaskOrPhase">
         <security https="true" auth="true"/>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml?rev=605459&r1=605458&r2=605459&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml Wed Dec 19 00:14:59 2007
@@ -28,7 +28,7 @@
         <menu-item name="resources" title="${uiLabelMap.ProjectMgrResources}"><link target="FindResource"/></menu-item>
         <menu-item name="timesheet" title="${uiLabelMap.Timesheet}"><link target="FindTimeSheet?findAll=N"/></menu-item>
         <menu-item name="SkillType" title="${uiLabelMap.ProjectMgrSkillType}"><link target="findSkillTypes"/></menu-item>
-        <menu-item name="calendar" title="${uiLabelMap.WorkEffortCalendar}"><link target="day"/></menu-item>
+        <!--menu-item name="calendar" title="${uiLabelMap.WorkEffortCalendar}"><link target="day"/></menu-item-->
         <menu-item name="request" title="${uiLabelMap.WorkEffortRequestList}"><link target="requestlist"/></menu-item>
         
         <menu-item name="help" title="Help" align-style="col-right">

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml?rev=605459&r1=605458&r2=605459&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml Wed Dec 19 00:14:59 2007
@@ -87,11 +87,17 @@
     <screen name="MyTasks">
         <section>            
             <actions>
-                <set field="titleProperty" value="PageTitleFindTask"/>
+                <set field="titleProperty" value="PageTitleMyTask"/>
                 <set field="headerItem" value="mytasks"/>
-                <set field="labelTitleProperty" value="ProjectMgrTaskName"/>
-                <set field="donePage" from-field="parameters.DONE_PAGE" default-value="/workeffort/control/Dependencies"/>
-                <script location="component://projectmgr/webapp/projectmgr/WEB-INF/actions/MyTasks.bsh"/>
+                <set field="labelTitleProperty" value="ProjectMgrMyTasks"/>
+                <entity-and entity-name="WorkEffortAndPartyAssign" list-name="tasks">
+                    <field-map field-name="partyId" env-name="userLogin.partyId"/>
+                    <field-map field-name="workEffortTypeId" value="TASK"/>
+                </entity-and>
+                <entity-one entity-name="WorkEffort" value-name="task">
+                    <field-map field-name="workEffortId" value="dummy"/>
+                </entity-one>
+                <set field="myTask" value="notNull"/>
             </actions>                                                
             <widgets>  
                 <decorator-screen name="CommonTaskDecorator" location="${parameters.mainDecoratorLocation}">
@@ -99,13 +105,29 @@
                         <section>                                                        
                             <widgets>
                                 <container style="screenlet">
-                                    <container style="screenlet-title-bar"><label style="boxhead">${uiLabelMap.PageTitleFindTask}</label></container>                                
+                                    <container style="screenlet-title-bar"><label style="boxhead">${uiLabelMap.PageTitleTaskAssignedToMe}</label></container>                                
                                     <container style="screenlet-body">
-                                        <include-form name="FindTask" location="component://projectmgr/widget/forms/TaskForms.xml"/>
+                                        <include-form name="MyTasks" location="component://projectmgr/widget/forms/TaskForms.xml"/>
                                     </container>
-                                </container>                                                                            
-                                <container style="button-bar"><link target="EditTask?workEffortTypeId=Task" text="${uiLabelMap.ProjectMgrNewTask}" style="buttontext"/></container>
-                                <include-form name="ListTasks" location="component://projectmgr/widget/forms/TaskForms.xml"/>
+                                </container>
+                                <container style="lefthalf">
+                                    
+                                <container style="screenlet">
+                                    <container style="screenlet-title-bar"><label style="boxhead">${uiLabelMap.ProjectMgrAssignATaskToMe}</label></container>                                
+                                    <container style="screenlet-body">
+                                        <include-form name="AddMyTask" location="component://projectmgr/widget/forms/TaskForms.xml"/>
+                                    </container>
+                                </container>                                                                            
+                                </container>
+                                <container style="righthalf">
+                                    
+                                <container style="screenlet">
+                                    <container style="screenlet-title-bar"><label style="boxhead">${uiLabelMap.ProjectMgrAddNewTask}</label></container>                                
+                                    <container style="screenlet-body">
+                                        <include-form name="EditTask" location="component://projectmgr/widget/forms/TaskForms.xml"/>
+                                    </container>
+                                </container>                                                                            
+                                </container>                                                                            
                             </widgets>                            
                         </section>
                     </decorator-section>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml?rev=605459&r1=605458&r2=605459&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml Wed Dec 19 00:14:59 2007
@@ -27,15 +27,50 @@
                 <field-map field-name="statusId" env-name="task.statusId"/>
             </entity-one>
         </actions>
+        <alt-target use-when="myTask!=null" target="createMyTask"/>
         <alt-target use-when="task==null" target="createTask"/>
+        <field use-when="myTask!=null" name="partyId"><hidden value="${userLogin.partyId}"/></field>
         <field name="projectId"><hidden value="${parameters.projectId}"/></field>
         <field name="DONE_PAGE"><hidden value="${donePage}"/></field>
         <field name="workEffortTypeId"><hidden value="TASK"/></field>
         <field use-when="task!=null" name="workEffortId" title="${uiLabelMap.ProjectMgrWorkEffortId}" tooltip="${uiLabelMap.CommonNotModifRecreat}"><display/></field>
         <field use-when="task==null" entry-name="dummy" name="workEffortName" title="${uiLabelMap.ProjectMgrTaskName}*" tooltip="${uiLabelMap.CommonRequired}"><text/></field>
-        <field use-when="task!=null&amp;&amp;workEffortId!=null" name="workEffortName" title="${uiLabelMap.ProjectMgrTaskName}*"><text/></field>
+        <field use-when="myTask!=null" name="roleTypeId" title="${uiLabelMap.ProjectMgrMyRoleForThisTask}">
+            <drop-down>
+                <entity-options entity-name="RoleType" description="${description}">
+                    <entity-constraint name="parentTypeId" value="PROJECT_TEAM"/>
+                    <entity-order-by field-name="description"/>
+                </entity-options>        
+            </drop-down>
+        </field>
+        <field use-when="projectId==null" name="workEffortParentId" title="${uiLabelMap.ProjectMgrTaskPhase}">
+            <drop-down allow-empty="true">
+                <entity-options entity-name="WorkEffort" key-field-name="workEffortId" description="${workEffortName}[${workEffortId}](project:${workEffortParentId})">
+                    <entity-constraint name="workEffortTypeId" value="PHASE"/>
+                    <entity-order-by field-name="workEffortParentId"/>
+                </entity-options>        
+            </drop-down>
+        </field>
+        <field use-when="projectId!=null" name="workEffortParentId" title="${uiLabelMap.ProjectMgrTaskPhase}">
+            <drop-down allow-empty="false">
+                <entity-options entity-name="WorkEffort" key-field-name="workEffortId" description="${workEffortName}[${workEffortId}]">
+                    <entity-constraint name="workEffortTypeId" value="PHASE"/>
+                    <entity-constraint name="workEffortParentId" value="${projectId}"/>
+                    <entity-order-by field-name="workEffortParentId"/>
+                </entity-options>        
+            </drop-down>
+        </field>
+        <field use-when="myTask!=null" name="workEffortParentId" title="${uiLabelMap.ProjectMgrTaskPhase}">
+            <drop-down allow-empty="false">
+                <entity-options entity-name="ProjectPartyAndPhase" key-field-name="phaseId" description="${phaseName} (Proj:${projectName})">
+                    <entity-constraint name="partyId" env-name="userLogin.partyId"/>
+                    <entity-order-by field-name="phaseName"/>
+                </entity-options>        
+            </drop-down>
+        </field>
         <field name="description" title="${uiLabelMap.CommonDescription}"><text/></field>
         <field use-when="task==null" name="currentStatusId"><hidden value="CAL_ACCEPTED"/></field>
+        <field use-when="myTask!=null" name="statusId"><hidden value="CAL_ACCEPTED"/></field>
         <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})">
@@ -64,23 +99,6 @@
                 </entity-options>
             </drop-down>
         </field>
-        <field use-when="projectId==null" name="workEffortParentId" title="${uiLabelMap.ProjectMgrTaskPhase}">
-            <drop-down allow-empty="true">
-                <entity-options entity-name="WorkEffort" key-field-name="workEffortId" description="${workEffortName}[${workEffortId}](project:${workEffortParentId})">
-                    <entity-constraint name="workEffortTypeId" value="PHASE"/>
-                    <entity-order-by field-name="workEffortParentId"/>
-                </entity-options>        
-            </drop-down>
-        </field>
-        <field use-when="projectId!=null" name="workEffortParentId" title="${uiLabelMap.ProjectMgrTaskPhase}">
-            <drop-down allow-empty="false">
-                <entity-options entity-name="WorkEffort" key-field-name="workEffortId" description="${workEffortName}[${workEffortId}]">
-                    <entity-constraint name="workEffortTypeId" value="PHASE"/>
-                    <entity-constraint name="workEffortParentId" value="${projectId}"/>
-                    <entity-order-by field-name="workEffortParentId"/>
-                </entity-options>        
-            </drop-down>
-        </field>
         <field name="estimatedStartDate" title="${uiLabelMap.FormFieldTitle_estimatedStartDate}"><date-time/></field>
         <field name="estimatedCompletionDate" title="${uiLabelMap.FormFieldTitle_estimatedCompletionDate}"><date-time/></field>
         <field name="save" title="${uiLabelMap.CommonSave}"><submit/></field>
@@ -158,9 +176,9 @@
         <field name="find" title="${uiLabelMap.CommonFind}"><submit/></field>
     </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="taskView?workEffortId=${workEffortId}"/>
-        </field>
+        <field name="workEffortId" title="${uiLabelMap.ProjectMgrTaskName}" widget-style="buttontext">
+            <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>
         <field name="priority"><display/></field>
@@ -171,7 +189,77 @@
         <field name="plannedHours"><display/></field>
         <field name="actualHours"><display/></field>
         <field name="createdDate"><display type="date"/></field>
-    </form>
+    </form>
+    <form name="MyTasks" type="list" list-name="tasks" paginate-target="MyTasks" target="updateMyTasks">
+        <row-actions>
+            <service service-name="getProjectTask" result-map-name="result">
+                <field-map field-name="taskId" env-name="workEffortId"/>
+                <field-map field-name="hoursPartyId" env-name="userLogin.partyId"/>
+            </service>
+            <set field="plannedHours" from-field="result.taskInfo.plannedHours"/>
+            <set field="actualHours" from-field="result.taskInfo.actualHours"/>
+            <set field="projectId" from-field="result.projectId"/>
+            <set field="projectName" from-field="result.projectName"/>
+        </row-actions>
+        <field name="workEffortId" title="${uiLabelMap.ProjectMgrTaskName}" widget-style="buttontext">
+            <hyperlink also-hidden="false" description="${workEffortName} [${workEffortId}]" target="taskView?workEffortId=${workEffortId}"/>
+        </field>
+        <field name="projectName"><display/></field>
+        <field name="priority"><display/></field>
+        <field name="estimatedStartDate" title="${uiLabelMap.WorkEffortEstimatedStartDate}"><display type="date"/></field>
+        <field name="estimatedCompletionDate" title="${uiLabelMap.WorkEffortEstimatedCompletionDate}" red-when="before-now"><display type="date"/></field>
+        <field name="actualStartDate" title="${uiLabelMap.WorkEffortActualStartDate}"><display type="date"/></field>
+        <field name="actualCompletionDate" title="${uiLabelMap.WorkEffortActualCompletionDate}" red-when="before-now"><display type="date"/></field>
+        <field name="plannedHours"><display/></field>
+        <field name="actualHours"><display/></field>
+        <field name="roleTypeId">
+            <drop-down>
+                <entity-options entity-name="RoleType" description="${description}">
+                    <entity-constraint name="parentTypeId" value="PROJECT_TEAM"/>
+                    <entity-order-by field-name="description"/>
+                </entity-options>        
+            </drop-down>
+        </field>
+        <field name="dummy" parameter-name="workEffortId"><hidden value="${workEffortId}"/></field>
+        <field name="fromDate"><hidden/></field>
+        <field name="statusId" title="${uiLabelMap.CommonStatus}">
+            <drop-down>
+                <entity-options entity-name="StatusItem" description="${description}">
+                    <entity-constraint name="statusTypeId" value="TASK_STATUS"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="partyId">
+            <drop-down>
+                <entity-options entity-name="PartyDetailAndWorkEffortAssign" description="${firstName} ${middleName} ${lastName}">
+                    <entity-constraint name="workEffortId" env-name="projectId"/>
+                    <entity-constraint name="workEffortTypeId" value="PROJECT"/>
+                </entity-options>    
+            </drop-down>
+        </field>
+        <field name="updateButton"><submit/></field>
+    </form>
+    <form name="AddMyTask" type="single" target="addMyTask">
+        <field name="partyId"><hidden value="${userLogin.partyId}"/></field>
+        <field name="statusId"><hidden value="CAL_ACCEPTED"/></field>
+        <field name="workEffortId" title="${uiLabelMap.ProjectMgrTaskName}">
+            <drop-down>
+                <entity-options entity-name="ProjectPartyAndPhaseAndTask" description="${workEffortName} (${phaseName}-${projectName})">
+                    <entity-constraint name="partyId" env-name="userLogin.partyId"/>
+                    <entity-constraint name="workEffortTypeId" value="TASK"/>
+                </entity-options>                
+            </drop-down>
+        </field>
+        <field name="roleTypeId">
+            <drop-down>
+                <entity-options entity-name="RoleType" description="${description}">
+                    <entity-constraint name="parentTypeId" value="PROJECT_TEAM"/>
+                    <entity-order-by field-name="description"/>
+                </entity-options>        
+            </drop-down>
+        </field>
+        <field name="addButton"><submit/></field>
+    </form>
     <form name="Dependencies" target="removeDependency" title="" list-name="depList" type="list" separate-columns="true" paginate-target="Dependencies">
         <field name="workEffortIdTo"><hidden/></field>
         <field name="workEffortIdFrom"><hidden/></field>
@@ -179,10 +267,10 @@
         <field name="fromDate"><hidden/></field>
         <field name="workEffortId"><hidden/></field>
         <field name="workEffortToName" title="${uiLabelMap.CommonName}"><hyperlink target="Dependencies?workEffortId=${workEffortIdTo}" description="${workEffortToName}"/></field>
-        <field name="workEffortToParentId" title="${uiLabelMap.ProjectMgrTaskPhase}"><display-entity entity-name="WorkEffort" key-field-name="workEffortId" description="${workEffortName}"/>/></field>        
-        <field name="estimatedStartDate" entry-name="workEffortToEstimatedStartDate" title="${uiLabelMap.WorkEffortEstimatedStartDate}"><display type="date"/>/></field>
+        <field name="workEffortToParentId" title="${uiLabelMap.ProjectMgrTaskPhase}"><display-entity entity-name="WorkEffort" key-field-name="workEffortId" description="${workEffortName}"/></field>        
+        <field name="estimatedStartDate" entry-name="workEffortToEstimatedStartDate" title="${uiLabelMap.WorkEffortEstimatedStartDate}"><display type="date"/></field>
         <field name="estimatedCompletionDate"  entry-name="workEffortToEstimatedCompletionDate" title="${uiLabelMap.WorkEffortEstimatedCompletionDate}"><display type="date"/></field>
-        <field name="actualStartDate" entry-name="workEffortToActualStartDate" title="${uiLabelMap.WorkEffortActualStartDate}"><display type="date"/>/></field>
+        <field name="actualStartDate" entry-name="workEffortToActualStartDate" title="${uiLabelMap.WorkEffortActualStartDate}"><display type="date"/></field>
         <field name="actualCompletionDate"  entry-name="workEffortToActualCompletionDate" title="${uiLabelMap.WorkEffortActualCompletionDate}"><display type="date"/></field>
         <field name="deleteButton"><submit button-type="button"/></field>
     </form>
@@ -252,7 +340,7 @@
     <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="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>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml?rev=605459&r1=605458&r2=605459&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml Wed Dec 19 00:14:59 2007
@@ -25,6 +25,7 @@
         <field name="workEffortId" title="${uiLabelMap.ProjectMgrTaskName}">
             <drop-down allow-empty="true">
                 <entity-options entity-name="ProjectAndPhaseAndTask" description="${workEffortName} -- ${phaseName} -- ${projectName}">
+                    <entity-constraint name="workEffortTypeId" operator="not-equals" value="TASK_TEMPLATE"/>
                     <entity-order-by field-name="projectName"/>
                     <entity-order-by field-name="phaseName"/>
                     <entity-order-by field-name="workEffortName"/>