Author: jleroux
Date: Fri Dec 1 04:49:34 2017
New Revision: 1816795
URL:
http://svn.apache.org/viewvc?rev=1816795&view=revLog:
Fixed: In 'updateOrderContactMech' service, A check should be added to call
'removeOrderContactMech'.
(OFBIZ-9967)
In case, user don't create orderContactMech while creating an order and wish to
create orderContactMech after the creation then, 'updateOrderContactMech'
throws error of 'oldContactMechId' parameter missing in 'removeOrderContactMech'
service.
Adds a 'if-not-empty' check for 'oldContactMechId' field i.e, if
'oldContactMechId' is available then only 'removeOrderContactMech' service
should be called in 'updateOrderContactMech' service.
Thanks: Sonal Patwari
Modified:
ofbiz/ofbiz-framework/trunk/applications/order/minilang/order/OrderServices.xml
Modified: ofbiz/ofbiz-framework/trunk/applications/order/minilang/order/OrderServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/minilang/order/OrderServices.xml?rev=1816795&r1=1816794&r2=1816795&view=diff==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/minilang/order/OrderServices.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/minilang/order/OrderServices.xml Fri Dec 1 04:49:34 2017
@@ -708,8 +708,10 @@ under the License.
<set from-field="parameters.orderId" field="orderContactMechLookupMap.orderId"/>
<set from-field="parameters.oldContactMechId" field="orderContactMechLookupMap.contactMechId"/>
<set from-field="parameters.contactMechPurposeTypeId" field="orderContactMechLookupMap.contactMechPurposeTypeId"/>
- <set-service-fields service-name="removeOrderContactMech" map="orderContactMechLookupMap" to-map="removeOrderContactMechMap"/>
- <call-service service-name="removeOrderContactMech" in-map-name="removeOrderContactMechMap" include-user-login="true"/>
+ <if-not-empty field="parameters.oldContactMechId">
+ <set-service-fields service-name="removeOrderContactMech" map="orderContactMechLookupMap" to-map="removeOrderContactMechMap"/>
+ <call-service service-name="removeOrderContactMech" in-map-name="removeOrderContactMechMap" include-user-login="true"/>
+ </if-not-empty>
</if-empty>
<store-value value-field="orderContactMechMap"/>
</else>