svn commit: r695633 - in /ofbiz/trunk/applications/order: script/org/ofbiz/order/request/CustRequestServices.xml servicedef/services_request.xml

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

svn commit: r695633 - in /ofbiz/trunk/applications/order: script/org/ofbiz/order/request/CustRequestServices.xml servicedef/services_request.xml

hansbak-2
Author: hansbak
Date: Mon Sep 15 14:20:31 2008
New Revision: 695633

URL: http://svn.apache.org/viewvc?rev=695633&view=rev
Log:
on a custRequest, return old status when updated, enable setting of name on create request from comm event

Modified:
    ofbiz/trunk/applications/order/script/org/ofbiz/order/request/CustRequestServices.xml
    ofbiz/trunk/applications/order/servicedef/services_request.xml

Modified: ofbiz/trunk/applications/order/script/org/ofbiz/order/request/CustRequestServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/script/org/ofbiz/order/request/CustRequestServices.xml?rev=695633&r1=695632&r2=695633&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/script/org/ofbiz/order/request/CustRequestServices.xml (original)
+++ ofbiz/trunk/applications/order/script/org/ofbiz/order/request/CustRequestServices.xml Mon Sep 15 14:20:31 2008
@@ -121,8 +121,8 @@
         </if>
     </simple-method>
     <simple-method method-name="updateCustRequest" short-description="Update Customer Request">
-        <set from-field="parameters.custRequestId" field="lookupPKMap.custRequestId"/>
-        <find-by-primary-key entity-name="CustRequest" map-name="lookupPKMap" value-name="custRequest"/>
+        <entity-one entity-name="CustRequest" value-name="custRequest"/>    
+        <field-to-result field-name="custRequest.statusId" result-name="oldStatusId"/>          
         <if-compare-field field="custRequest.statusId" to-field="parameters.statusId" operator="not-equals">
             <!-- save the changed status in the history -->
             <set field="custRequest.statusId" from-field="parameters.statusId"/>
@@ -379,7 +379,9 @@
             <return response-code="error"/>
         </if-empty>    
         <set-service-fields service-name="createCustRequest" map-name="parameters" to-map-name="custRequest"/>
-        <set field="custRequest.custRequestName" from-field="communicationEvent.subject"/>
+        <if-empty field="custRequest.custRequestName">
+            <set field="custRequest.custRequestName" from-field="communicationEvent.subject"/>
+        </if-empty>
         <if-empty field="parameters.custRequestTypeId">
             <set field="custRequest.custRequestTypeId" value="RF_SUPPORT"/>
         </if-empty>

Modified: ofbiz/trunk/applications/order/servicedef/services_request.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/servicedef/services_request.xml?rev=695633&r1=695632&r2=695633&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/servicedef/services_request.xml (original)
+++ ofbiz/trunk/applications/order/servicedef/services_request.xml Mon Sep 15 14:20:31 2008
@@ -47,6 +47,7 @@
         <description>Update a custRequest record</description>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
+        <attribute name="oldStatusId" type="String" mode="OUT"/>
     </service>
 
     <service name="createCustRequestAttribute" engine="simple"
@@ -171,6 +172,7 @@
         <auto-attributes mode="IN" include="pk" optional="false"/>
         <auto-attributes mode="IN" include="nonpk" optional="true"/>
         <attribute name="custRequestTypeId" mode="IN" type="String" optional="true"/>
+        <attribute name="custRequestName" mode="IN" type="String" optional="true"/>
         <attribute name="custRequestId" mode="OUT" type="String" optional="false"/>
     </service>
 </services>