svn commit: r685078 - in /ofbiz/trunk: applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml

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

svn commit: r685078 - in /ofbiz/trunk: applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml

hansbak-2
Author: hansbak
Date: Tue Aug 12 01:06:53 2008
New Revision: 685078

URL: http://svn.apache.org/viewvc?rev=685078&view=rev
Log:
change status of customer request when copied into a projectTask

Modified:
    ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml
    ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml

Modified: ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml?rev=685078&r1=685077&r2=685078&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml (original)
+++ ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml Tue Aug 12 01:06:53 2008
@@ -70,10 +70,19 @@
 
         <!-- attach to a customer request if passed and copy attached docs if customer request has communication events with attachments -->
         <if-not-empty field="parameters.custRequestId">
+            <!-- check status of customer request should be assigned -->
+            <entity-one entity-name="CustRequest" value-name="custRequest"/>
+            <if-compare operator="not-equals" value="CRQ_ACCEPTED" field="custRequest.statusId">
+                <add-error><fail-message message="Cannot create task from Customer Request: wrong status of customer request"/></add-error>
+            </if-compare>
             <make-value value-name="custRequestWorkEffort" entity-name="CustRequestWorkEffort"/>
             <set field="custRequestWorkEffort.workEffortId" from-field="newEntity.workEffortId" />
             <set field="custRequestWorkEffort.custRequestId" from-field="parameters.custRequestId"/>
             <create-value value-name="custRequestWorkEffort"/>
+            <!-- update status of customer request -->
+            <set field="updCustReq.custRequestId" from-field="parameters.custRequestId"/>
+            <set field="updCustReq.statusId" value="CRQ_REVIEWED"/>
+            <call-service service-name="setCustRequestStatus" in-map-name="updCustReq"/>
             <entity-and list-name="custRequestCommEvents" entity-name="CustRequestCommEvent">
                 <field-map field-name="custRequestId" env-name="parameters.custRequestId"/>
             </entity-and>

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=685078&r1=685077&r2=685078&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml Tue Aug 12 01:06:53 2008
@@ -556,7 +556,7 @@
     <request-map uri="CreateTaskFromRequest">
         <security https="true" auth="true"/>
         <event type="service" invoke="createWorkEffort"/>
-        <response name="success" type="request" value="updaterequeststatus"/>
+        <response name="success" type="request" value="taskView"/>
         <response name="error" type="view" value="EditTaskFromRequest"/>
     </request-map>
     <request-map uri="newrequest">
@@ -587,12 +587,6 @@
         <response name="success" type="view" value="ListResourcesUnBilledHours"/>
         <response name="error" type="view" value="ListResourcesUnBilledHours"/>
     </request-map>
-    <request-map uri="updaterequeststatus">
-        <security https="true" auth="true"/>
-        <event type="service" invoke="updateCustRequest"/>
-        <response name="success" type="view" value="RequestList"/>
-        <response name="error" type="view" value="RequestList"/>
-    </request-map>
     <request-map uri="editperson"><security https="true" auth="true"/><response name="success" type="view" value="EditPerson"/></request-map>
     <request-map uri="updatePerson">
         <security https="true" auth="true"/>