on a custRequest, return old status when updated, enable setting of name on create request from comm event

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@695633 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hans Bakker
2008-09-15 21:20:31 +00:00
parent 754d787b4a
commit 581fb4e7d0
2 changed files with 7 additions and 3 deletions
@@ -121,8 +121,8 @@ under the License.
</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 @@ under the License.
<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>
@@ -47,6 +47,7 @@ under the License.
<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 @@ under the License.
<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>