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

hansbak-2
Author: hansbak
Date: Sun Feb 24 00:18:43 2008
New Revision: 630602

URL: http://svn.apache.org/viewvc?rev=630602&view=rev
Log:
added add/mod timeentry on th task level

Modified:
    ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.properties
    ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrTypeData.xml
    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/EditWeekTimesheet.bsh
    ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml
    ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.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=630602&r1=630601&r2=630602&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.properties (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/config/ProjectMgrUiLabels.properties Sun Feb 24 00:18:43 2008
@@ -120,7 +120,8 @@
 ProjectMgrResources=Resources
 ProjectMgrResourceName=Resource Name
 ProjectMgrSetOnHold=On-Hold
-ProjectMgrSkillStandards=Requirements
+ProjectMgrSkillStandards=Planned Hours
+ProjectMgrTimeEntries=Actual Hours
 ProjectMgrSkillType=Skill Type
 ProjectMgrSaveAsTemplate=Save As Template
 ProjectMgrSubProjectName=Sub Project Name
@@ -162,7 +163,6 @@
 ProjectMgrTaskNotAssignedPhase=Task not assigned to Phase/Iteration
 ProjectMgrToFindTask=To Find Task Give Range
 ProjectMgrToFindProject=To Find Project Give Range
-ProjectMgrTimeEntries=Add/Edit Time Entries
 PageTitleListTimeEntries=List Time Entries for
 ProjectMgrQuickAssignPartyId=Quick Assign Party Id
 CommonStatustoComplete=Status to 'complete'

Modified: ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrTypeData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrTypeData.xml?rev=630602&r1=630601&r2=630602&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrTypeData.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrTypeData.xml Sun Feb 24 00:18:43 2008
@@ -48,11 +48,13 @@
     <StatusType description="Project" statusTypeId="PROJECT" hasTable="N" parentTypeId=""/>
     <StatusType description="Project Task" statusTypeId="PROJECT_TASK_STATUS" hasTable="N" parentTypeId="PROJECT"/>
     <StatusType description="Project Assignment" statusTypeId="PROJECT_ASSGN_STATUS" hasTable="N" parentTypeId="PROJECT"/>
-
+
+    <!-- assignment status on a task -->
     <StatusItem description="Assigned" sequenceId="01" statusCode="ASSIGNED" statusId="PAS_ASSIGNED" statusTypeId="PROJECT_ASSGN_STATUS"/>
     <StatusItem description="Completed" sequenceId="02" statusCode="COMPLETED" statusId="PAS_COMPLETED" statusTypeId="PROJECT_ASSGN_STATUS"/>
     <StatusValidChange condition="" statusId="PAS_ASSIGNED" statusIdTo="PAS_COMPLETED" transitionName="Assignment Complete"/>
-    
+    
+    <!-- status of the task itself -->
     <StatusItem description="Created" sequenceId="01" statusCode="CREATED" statusId="PTS_CREATED" statusTypeId="PROJECT_TASK_STATUS"/>
     <StatusItem description="Unassigned" sequenceId="02" statusCode="CREATED" statusId="PTS_CREATED_UA" statusTypeId="PROJECT_TASK_STATUS"/>
     <StatusItem description="Assigned" sequenceId="03" statusCode="CREATED" statusId="PTS_CREATED_AS" statusTypeId="PROJECT_TASK_STATUS"/>

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=630602&r1=630601&r2=630602&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml Sun Feb 24 00:18:43 2008
@@ -915,4 +915,47 @@
         </if-not-empty>
     </simple-method>
     
+    <simple-method method-name="createTimeEntryInTimesheet" short-description="Creates TimeEntry and searches for a timesheetId if not provided">
+        <if-not-empty field-name="parameters.fromDate">
+            <if-empty field-name="parameters.timesheetId">
+                <entity-condition entity-name="Timesheet" list-name="timesheets">
+                    <condition-list combine="and">
+                        <condition-expr field-name="fromDate" operator="less-equals" env-name="parameters.fromDate"/>
+                        <condition-expr field-name="thruDate" operator="greater-equals" env-name="parameters.fromDate"/>
+                        <condition-expr field-name="partyId" operator="equals" env-name="parameters.partyId"/>
+                    </condition-list>
+                </entity-condition>
+                <if-not-empty field-name="timesheets">
+                    <!-- use existing timesheet -->
+                    <first-from-list entry-name="timesheet" list-name="timesheets"/>
+                    <if-compare field-name="timesheet.statusId" value="TIMESHEET_IN_PROCESS" operator="equals">
+                        <set field="parameters.timesheetId" from-field="timesheet.timesheetId"/>
+                        <else>
+                            <add-error>
+                                <fail-message message="Cannot add to timesheet ${timesheet.timesheetId} because the status does not allow additions or modifications."/>
+                            </add-error>
+                            <check-errors/>
+                        </else>                        
+                    </if-compare>
+                    <else>
+                        <!-- create new timesheet -->
+                        <set field="parameters.requiredDate" from-field="parameters.fromDate"/>
+                        <call-simple-method method-name="createTimesheetForThisWeek" xml-resource="component://workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml"/>
+                        <set field="parameters.timesheetId" from-field="newEntity.timesheetId"/>
+                    </else>
+                </if-not-empty>
+            </if-empty>
+        </if-not-empty>
+        <!-- get role for this party in this project -->
+        <entity-and entity-name="ProjectPartyAndPhaseAndTask" list-name="taskRoles" filter-by-date="true">
+            <field-map field-name="partyId" env-name="parameters.partyId"/>
+            <field-map field-name="workEffortId" env-name="parameters.workEffortId"/>
+        </entity-and>
+        <first-from-list entry-name="taskRole" list-name="taskRoles"/>
+        <set field="parameters.roleTypeId" from-field="taskRole.roleTypeId"/>
+        <set field="parameters.statusId" value="PAS_ASSIGNED"/>
+        <call-simple-method method-name="assignPartyToWorkEffort" xml-resource="component://workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml"/>
+        <call-simple-method method-name="createTimeEntry" xml-resource="component://workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml"/>
+    </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=630602&r1=630601&r2=630602&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml Sun Feb 24 00:18:43 2008
@@ -22,6 +22,16 @@
     xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
     <description>Project Manager service definitions.</description>
 
+    <service name="createTimeEntryInTimesheet" default-entity-name="TimeEntry" engine="simple" auth="true"
+        location="org/ofbiz/project/ProjectServices.xml" invoke="createTimeEntryInTimesheet">
+        <description>Creates TimeEntry and searches for a timesheetId, if required it will create a weekly time sheet, it also assigns the party to the task</description>
+        <permission-service service-name="projectMgrPermission" main-action="CREATE"/>
+        <auto-attributes include="pk" mode="OUT" optional="false"/>
+        <auto-attributes include="nonpk" mode="IN" optional="true"/>
+        <attribute name="timesheetId" type="String" mode="OUT" optional="true"/>
+        <attribute name="fromDate" type="Timestamp" mode="OUT" optional="true"/>
+    </service>
+
     <service name="createProjectTimesheet" engine="simple" default-entity-name="Timesheet"
         location="org/ofbiz/workeffort/timesheet/TimesheetServices.xml" invoke="createTimesheetForThisWeek">
         <description>Creates Timesheet for this week if no required date specified.</description>

Modified: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.bsh?rev=630602&r1=630601&r2=630602&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.bsh (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.bsh Sun Feb 24 00:18:43 2008
@@ -106,7 +106,7 @@
             workEffortPartyAssign = workEffortPartyAssigns.get(0);
             entry.put("fromDate", workEffortPartyAssign.getTimestamp("fromDate"));
             entry.put("roleTypeId", workEffortPartyAssign.getString("roleTypeId"));
-            if (workEffortPartyAssign.getString("statusId").equals("PAS_COMPLETED")) {
+            if ("PAS_COMPLETED".equals(workEffortPartyAssign.getString("statusId"))) {
                 entry.put("checkComplete", "Y");
             }
         }

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=630602&r1=630601&r2=630602&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml Sun Feb 24 00:18:43 2008
@@ -382,7 +382,7 @@
     </request-map>
     <request-map uri="createTimeEntry">
         <security https="true" auth="true"/>
-        <event type="service" invoke="createTimeEntry"/>
+        <event type="service" invoke="createTimeEntryInTimesheet"/>
         <response name="success" type="view" value="EditTimeEntries"/>
         <response name="error" type="view" value="EditTimeEntries"/>
     </request-map>
@@ -807,7 +807,7 @@
     <view-map name="EditTaskSkills" type="screen" page="component://projectmgr/widget/TaskScreens.xml#EditTaskSkills"/>
     <view-map name="projectView" type="screen" page="component://projectmgr/widget/ProjectScreens.xml#ProjectView"/>
     <view-map name="EditPartySkills" type="screen" page="component://projectmgr/widget/ProjectScreens.xml#EditPartySkills"/>
-    <view-map name="EditTimeEntries" type="screen" page="component://projectmgr/widget/ProjectScreens.xml#EditTimeEntries"/>
+    <view-map name="EditTimeEntries" type="screen" page="component://projectmgr/widget/TaskScreens.xml#EditTimeEntries"/>
     <view-map name="FindTimeSheet" type="screen" page="component://projectmgr/widget/TimeSheetScreens.xml#FindTimeSheet"/>
     <view-map name="EditTimeSheet" type="screen" page="component://projectmgr/widget/TimeSheetScreens.xml#EditTimeSheet"/>
     <view-map name="addWeeklyTimesheet" type="screen" page="component://projectmgr/widget/TimeSheetScreens.xml#addWeeklyTimesheet"/>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml?rev=630602&r1=630601&r2=630602&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml Sun Feb 24 00:18:43 2008
@@ -260,16 +260,27 @@
             </condition>
             <link target="EditTaskPartyAssigns?workEffortId=${workEffortId}"/>
         </menu-item>
-        <menu-item name="projectskills" title="${uiLabelMap.ProjectMgrSkillStandards}">
-            <condition>
-                <and>
-                    <not><if-empty field-name="workEffort"/></not>
-                    <if-compare field-name="workEffort.currentStatusId" operator="not-equals" value="PTS_COMPLETED"/>
-                    <if-compare field-name="workEffort.currentStatusId" operator="not-equals" value="PTS_CANCELLED"/>
-                    <if-compare field-name="workEffort.currentStatusId" operator="not-equals" value="PTS_ON_HOLD"/>
-                </and>
-            </condition>
+        <menu-item name="projectskills" title="${uiLabelMap.ProjectMgrSkillStandards}">
+            <condition>
+                <and>
+                    <not><if-empty field-name="workEffort"/></not>
+                    <if-compare field-name="workEffort.currentStatusId" operator="not-equals" value="PTS_COMPLETED"/>
+                    <if-compare field-name="workEffort.currentStatusId" operator="not-equals" value="PTS_CANCELLED"/>
+                    <if-compare field-name="workEffort.currentStatusId" operator="not-equals" value="PTS_ON_HOLD"/>
+                </and>
+            </condition>
             <link target="EditTaskSkills?workEffortId=${workEffortId}"/>
+        </menu-item>
+        <menu-item name="timeEntries" title="${uiLabelMap.ProjectMgrTimeEntries}">
+            <condition>
+                <and>
+                    <not><if-empty field-name="workEffort"/></not>
+                    <if-compare field-name="workEffort.currentStatusId" operator="not-equals" value="PTS_COMPLETED"/>
+                    <if-compare field-name="workEffort.currentStatusId" operator="not-equals" value="PTS_CANCELLED"/>
+                    <if-compare field-name="workEffort.currentStatusId" operator="not-equals" value="PTS_ON_HOLD"/>
+                </and>
+            </condition>
+            <link target="EditTimeEntries?workEffortId=${workEffortId}"/>
         </menu-item>
         <menu-item name="notes" title="${uiLabelMap.CommonNotes}">
             <link target="EditTaskNotes?workEffortId=${workEffortId}"/>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml?rev=630602&r1=630601&r2=630602&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml Sun Feb 24 00:18:43 2008
@@ -605,45 +605,6 @@
             </widgets>
         </section>
     </screen>
-    <screen name="EditTimeEntries">
-        <section>
-            <actions>
-                <set field="titleProperty" value="PageTitleListTimeEntries"/>
-                <set field="tabButtonItem" value="tasks"/>
-                <set field="labelTitleProperty" value="PageTitleEditSkill"/>
-                <set field="workEffortId" from-field="parameters.workEffortId"/>
-                <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/>
-                <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="10"/>
-            </actions>
-            <widgets>
-                <decorator-screen name="CommonProjectDecorator" location="${parameters.mainDecoratorLocation}">
-                    <decorator-section name="body">
-                        <section>                            
-                            <widgets>
-                                <container style="screenlet">
-                                    <container style="screenlet-title-bar">
-                                        <container style="h3">
-                                            <label text="${uiLabelMap.${titleProperty}} ${workEffortId}"/>
-                                        </container>
-                                    </container>
-                                    <container style="screenlet-body">
-                                        <section>
-                                            <widgets>    
-                                                <include-form name="ListTimeEntries" location="component://projectmgr/widget/forms/ProjectForms.xml"/>
-                                            </widgets>
-                                        </section>
-                                    </container>
-                                </container>
-                                <platform-specific>
-                                    <html><html-template location="component://projectmgr/webapp/projectmgr/project/EditTimeEntry.ftl"/></html>
-                                </platform-specific>
-                            </widgets>                            
-                        </section>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
     <screen name="EditProjectNotes">
         <section>
             <actions>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml?rev=630602&r1=630601&r2=630602&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml Sun Feb 24 00:18:43 2008
@@ -356,33 +356,42 @@
             <widgets>
                 <decorator-screen name="CommonTaskDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
-                        <section>                            
-                            <widgets>
-                                <container style="screenlet">
-                                    <container style="screenlet-title-bar">
-                                        <container style="h3">
-                                            <label text="${uiLabelMap.${titleProperty}}"/>
-                                        </container>
-                                    </container>
-                                    <container style="screenlet-body">
-                                        <section>
-                                            <widgets>    
-                                                <include-form name="ListTaskSkills" location="component://projectmgr/widget/forms/TaskForms.xml"/>
-                                            </widgets>
-                                        </section>
-                                    </container>
-                                </container>
-                                <platform-specific>
-                                    <html><html-template location="component://projectmgr/webapp/projectmgr/project/edittaskskills.ftl"/></html>
-                                </platform-specific>
-                            </widgets>                            
-                        </section>
+                        <screenlet title="${uiLabelMap.${titleProperty}}">
+                            <include-form name="ListTaskSkills" location="component://projectmgr/widget/forms/TaskForms.xml"/>
+                        </screenlet>
+                        <platform-specific>
+                            <html><html-template location="component://projectmgr/webapp/projectmgr/project/edittaskskills.ftl"/></html>
+                        </platform-specific>
                     </decorator-section>
                 </decorator-screen>
             </widgets>
         </section>
     </screen>    
-    <screen name="ChildTaskWorkEfforts">
+    <screen name="EditTimeEntries">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleListTimeEntries"/>
+                <set field="tabButtonItem" value="timeEntries"/>
+                <set field="labelTitleProperty" value="PageTitleEditSkill"/>
+                <set field="workEffortId" from-field="parameters.workEffortId"/>
+                <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/>
+                <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="10"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonTaskDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <screenlet title="${uiLabelMap.${titleProperty}} ${workEffortId}">
+                            <include-form name="ListTimeEntries" location="component://projectmgr/widget/forms/TaskForms.xml"/>
+                        </screenlet>
+                        <screenlet title="Add Time Entry">
+                            <include-form name="createTimeEntry" location="component://projectmgr/widget/forms/TaskForms.xml"/>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <!--screen name="ChildTaskWorkEfforts">
         <section>
             <actions>                
                 <set field="titleProperty" value="PageTitleListWorkEfforts"/>
@@ -426,7 +435,7 @@
                 </section>
             </widgets>
         </section>
-    </screen>
+    </screen-->
     <screen name="EditTaskPartyAssigns">
         <section>
             <actions>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml?rev=630602&r1=630601&r2=630602&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml Sun Feb 24 00:18:43 2008
@@ -411,46 +411,6 @@
         <field entry-name="xx" name="thruDate"><date-time type="date"/></field>
         <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit button-type="button"/></field>
     </form>
-    <form name="ListTimeEntries" type="list" list-name="timesheetEntries" target="updateTimeEntry" paginate-target="EditTimeEntries"
-        odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
-        <actions>
-            <entity-condition entity-name="TimeEntry">
-                <condition-expr field-name="workEffortId" env-name="workEffortId"/>
-                <order-by field-name="timesheetId"/>
-                <order-by field-name="partyId"/>
-                <order-by field-name="rateTypeId"/>
-                <order-by field-name="-fromDate"/>
-            </entity-condition>
-        </actions>
-        <auto-fields-service service-name="updateTimeEntry"/>        
-        <field name="fixedAssetId"><hidden/></field>
-        <field name="maintHistSeqId"><hidden/></field>
-        <field name="timeEntryId"><hidden/></field>
-        <field name="workEffortId" title="${uiLabelMap.ProjectMgrWorkEffortId}" widget-style="buttontext">
-            <hyperlink also-hidden="false" description="${workEffortId}" target="EditProject?workEffortId=${workEffortId}"/>
-        </field>
-        <field name="timesheetId">
-            <lookup size="10" target-form-name="LookupTimesheet">
-                <sub-hyperlink target="EditTimesheet?timesheetId=${timesheetId}" link-style="buttontext" description="TS:${timesheetId}"/>
-            </lookup>
-        </field>
-        <field name="partyId" title="${uiLabelMap.PartyParty}"><lookup size="12" target-form-name="LookupPerson" default-value="${timesheet.partyId}"/></field>        
-        <field name="rateTypeId" title="${uiLabelMap.TimesheetRateType}">
-            <drop-down>
-                <entity-options entity-name="RateType" description="${description}">
-                    <entity-order-by field-name="description"/>
-                </entity-options>
-            </drop-down>
-        </field>
-        <field name="invoiceId"><ignored/><!-- don't pass, will be populated when this is added to an invoice later --></field>
-        <field name="invoiceItemSeqId"><ignored/><!-- don't pass, will be populated when this is added to an invoice later --></field>
-        <field name="invoiceInfo"><hidden/></field>
-        <field name="comments"><text size="60"/></field>
-        <field name="submitButton" title="${uiLabelMap.CommonUpdate}"><submit button-type="button"/></field>
-        <field name="deleteLink" title="${uiLabelMap.CommonDelete}" widget-style="buttontext">
-            <hyperlink target="deleteTimeEntry?workEffortId=${workEffortId}&amp;timeEntryId=${timeEntryId}" description="${uiLabelMap.CommonDelete}" also-hidden="false"/>
-        </field>
-    </form>
     <form name="ListProjectNotes" extends="ListWorkEffortNotes" extends-resource="component://workeffort/widget/WorkEffortForms.xml" type="list" paginate-target="EditWorkEffortNotes"
         odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
         <actions>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml?rev=630602&r1=630601&r2=630602&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml Sun Feb 24 00:18:43 2008
@@ -385,6 +385,69 @@
         <field name="estimatedCost" title="${uiLabelMap.ProjectMgrEstimatedCost}" widget-style="linktext"><text/></field>
         <field name="submitButton" title="${uiLabelMap.CommonUpdate}"><submit button-type="button"/></field>
     </form>
+    <form name="ListTimeEntries" type="list" list-name="timesheetEntries" target="updateTimeEntry" paginate-target="EditTimeEntries"
+        odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
+        <actions>
+            <entity-condition entity-name="TimeEntry">
+                <condition-expr field-name="workEffortId" env-name="workEffortId"/>
+                <order-by field-name="timesheetId"/>
+                <order-by field-name="partyId"/>
+                <order-by field-name="rateTypeId"/>
+                <order-by field-name="-fromDate"/>
+            </entity-condition>
+        </actions>
+        <auto-fields-service service-name="updateTimeEntry"/>        
+        <field name="fixedAssetId"><hidden/></field>
+        <field name="maintHistSeqId"><hidden/></field>
+        <field name="timeEntryId"><hidden/></field>
+        <field name="workEffortId"><hidden/></field>
+        <field name="timesheetId"><hyperlink target="Timesheet?timesheetId=${timesheetId}" description="${timesheetId}"/></field>
+        <field name="partyId">
+            <drop-down allow-empty="false">
+                <entity-options entity-name="PartyRoleAndPartyDetail" description="${firstName} ${middleName} ${lastName}">
+                    <entity-constraint name="roleTypeId" operator="equals" value="PROJECT_TEAM"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="rateTypeId" title="${uiLabelMap.TimesheetRateType}">
+            <drop-down no-current-selected-key="STANDARD">
+                <entity-options entity-name="RateType" description="${description}">
+                    <entity-order-by field-name="description"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="invoiceId"><ignored/><!-- don't pass, will be populated when this is added to an invoice later --></field>
+        <field name="invoiceItemSeqId"><ignored/><!-- don't pass, will be populated when this is added to an invoice later --></field>
+        <field name="fromDate"><date-time type="date"/></field>
+        <field name="thruDate"><ignored/></field><!-- not used in project manager -->
+        <field name="invoiceInfo"><hidden/></field>
+        <field name="comments"><text size="60"/></field>
+        <field name="submitButton" title="${uiLabelMap.CommonUpdate}"><submit button-type="button"/></field>
+        <field name="deleteLink" title="${uiLabelMap.CommonDelete}" widget-style="buttontext">
+            <hyperlink target="deleteTimeEntry?workEffortId=${workEffortId}&amp;timeEntryId=${timeEntryId}" description="${uiLabelMap.CommonDelete}" also-hidden="false"/>
+        </field>
+    </form>
+    <form name="createTimeEntry" type="single" target="createTimeEntry" header-row-style="header-row" default-table-style="basic-table">
+        <field name="fromDate" title="${uiLabelMap.CommonDate}"><date-time type="date"/></field>
+        <field name="hours"><text size="10"/></field>
+        <field name="partyId">
+            <drop-down allow-empty="false">
+                <entity-options entity-name="PartyRoleAndPartyDetail" description="${firstName} ${middleName} ${lastName}">
+                    <entity-constraint name="roleTypeId" operator="equals" value="PROJECT_TEAM"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="rateTypeId" title="${uiLabelMap.TimesheetRateType}">
+            <drop-down no-current-selected-key="STANDARD">
+                <entity-options entity-name="RateType" description="${description}">
+                    <entity-order-by field-name="description"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="comments"><text size="40"/></field>
+        <field name="workEffortId"><hidden value="${parameters.workEffortId}"/></field>
+        <field name="addButton" title="${uiLabelMap.CommonAdd}"><submit/></field>
+    </form>    
     <form name="ListTaskNotes" extends="ListWorkEffortNotes" extends-resource="component://workeffort/widget/WorkEffortForms.xml" type="list" list-name="taskNotes" paginate-target="EditTaskNotes"
         odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
         <actions>