You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2012/05/19 08:39:24 UTC

svn commit: r1340352 - /ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml

Author: jleroux
Date: Sat May 19 06:39:24 2012
New Revision: 1340352

URL: http://svn.apache.org/viewvc?rev=1340352&view=rev
Log:
A patch from Leon for "Exception there when trying to update order's "Shipping Destination Address"" https://issues.apache.org/jira/browse/OFBIZ-4865

If click the "update" button of "Shipping Destination Address" in order view page, an exception thrown out as:
    The Following Errors Occurred:
    BeanShell execution caused an error: Sourced file: inline evaluation of: `` shipmentMethod = parameters.get("shipmentMethod"); if(s . . . ''

I searched the log and find the root cause is "java.lang.ArrayIndexOutOfBoundsException" from bsh script. As Paul told, there should be at least two "@" chars in "shipmentmethod" value. So I guess maybe somewhere "@" is missing. I tried to lookup for codes which construct parameters map for calling, and fortunately, I found it.

Modified:
    ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml

Modified: ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml?rev=1340352&r1=1340351&r2=1340352&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml (original)
+++ ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml Sat May 19 06:39:24 2012
@@ -735,7 +735,7 @@ under the License.
            <if-not-empty field="shipGroupList">
               <iterate list="shipGroupList" entry="shipGroup">
                  <set field="inputMap.shipGroupSeqId" from-field="shipGroup.shipGroupSeqId"/>
-                 <set field="inputMap.shipmentMethod" value="${shipGroup.shipmentMethodTypeId}@${shipGroup.carrierPartyId}"/>
+                 <set field="inputMap.shipmentMethod" value="${shipGroup.shipmentMethodTypeId}@${shipGroup.carrierPartyId}@${shipGroup.carrierRoleTypeId}"/>
                  <set field="inputMap.oldContactMechId" from-field="parameters.oldContactMechId"/>
                  <set-service-fields to-map="orderItemShipGroupMap" service-name="updateOrderItemShipGroup" map="inputMap"/>
                  <call-service service-name="updateOrderItemShipGroup" in-map-name="orderItemShipGroupMap" include-user-login="true"/>