svn commit: r687008 - in /ofbiz/trunk/specialpurpose: mypage/widget/MyPageForms.xml projectmgr/script/org/ofbiz/project/ProjectServices.xml

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

svn commit: r687008 - in /ofbiz/trunk/specialpurpose: mypage/widget/MyPageForms.xml projectmgr/script/org/ofbiz/project/ProjectServices.xml

hansbak-2
Author: hansbak
Date: Tue Aug 19 02:57:20 2008
New Revision: 687008

URL: http://svn.apache.org/viewvc?rev=687008&view=rev
Log:
task to complete only on timesheet, if task has related customer request that status will also be set to complete

Modified:
    ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml
    ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml

Modified: ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml?rev=687008&r1=687007&r2=687008&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml (original)
+++ ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml Tue Aug 19 02:57:20 2008
@@ -29,7 +29,8 @@
         <field name="projectName" title="${uiLabelMap.ProjectMgrProjectName}"><hyperlink target="/projectmgr/control/projectView?projectId=${resultProject.projectId}"  target-type="inter-app" target-window="_BLANK" description="${resultProject.projectName}"/></field>
         <field name="roleTypeId" parameter-name="newRoleTypeId" title="${uiLabelMap.PartyRole}"><hidden value="${roleTypeId}"/></field>
         <field name="remove" title="${uiLabelMap.CommonRemove}"><hyperlink target="updateTaskAssigment?workEffortId=${workEffortId}&amp;partyId=${partyId}&amp;roleTypeId=${roleTypeId}&amp;fromDate=${fromDate}&amp;statusId=PAS_ENDED&amp;donePage=${parameters.donePage}" description="${uiLabelMap.CommonRemove}"/></field>
-        <field name="toComplete" title="${uiLabelMap.CommonStatustoComplete}"><hyperlink target="updateTaskAssigment?workEffortId=${workEffortId}&amp;partyId=${partyId}&amp;roleTypeId=${roleTypeId}&amp;fromDate=${fromDate}&amp;statusId=PAS_COMPLETED&amp;donePage=${parameters.donePage}" description="${uiLabelMap.CommonStatustoComplete}"/></field>
+        <!-- better set to complete on the timesheet -->
+        <!-- field name="toComplete" title="${uiLabelMap.CommonStatustoComplete}"><hyperlink target="updateTaskAssigment?workEffortId=${workEffortId}&amp;partyId=${partyId}&amp;roleTypeId=${roleTypeId}&amp;fromDate=${fromDate}&amp;statusId=PAS_COMPLETED&amp;donePage=${parameters.donePage}" description="${uiLabelMap.CommonStatustoComplete}"/></field-->
     </form>
     
     <form name="EditWeekTimesheet" extends="EditWeekTimesheet" extends-resource="component://projectmgr/widget/forms/TimeSheetForms.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=687008&r1=687007&r2=687008&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml Tue Aug 19 02:57:20 2008
@@ -132,6 +132,17 @@
             <now-timestamp-to-env env-name="parameters.actualCompletionDate"/>
             <set field="parameters.currentStatusId" value="PTS_COMPLETED"/>
             <call-simple-method method-name="updateWorkEffort" xml-resource="component://workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml"/>
+            <!-- check for related customer request, set these too to completed -->
+            <entity-and list-name="custRequests" entity-name="CustRequestWorkEffort">
+                <field-map field-name="workEffortId" env-name="parameters.workEffortId"/>
+            </entity-and>            
+            <if-not-empty field="custRequests">
+                <iterate entry-name="custReq" list-name="custRequests">
+                    <set field="updStat.custRequestId" from-field="custReq.custRequestId"/>
+                    <set field="updStat.statusId" value="CRQ_COMPLETED"/>
+                    <call-service service-name="updateCustRequest" in-map-name="updStat"/>
+                </iterate>
+            </if-not-empty>
         </if-empty>
     </simple-method>