You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by si...@apache.org on 2007/10/11 00:36:34 UTC
svn commit: r583636 -
/ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml
Author: sichen
Date: Wed Oct 10 15:36:33 2007
New Revision: 583636
URL: http://svn.apache.org/viewvc?rev=583636&view=rev
Log:
fix a potential bug where an unrelated contactMechId might be assigned to Shipment.destinationTelecomNumberId if there are no phone numbers for a facility
Modified:
ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml
Modified: ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml?rev=583636&r1=583635&r2=583636&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml Wed Oct 10 15:36:33 2007
@@ -580,8 +580,12 @@
<set value="PHONE_SHIPPING" field="findFcmpMap.contactMechPurposeTypeId"/>
<find-by-and entity-name="FacilityContactMechPurpose" map-name="findFcmpMap" order-by-list-name="descendingFromDateOrder" list-name="facilityContactMechPurposes"/>
<filter-list-by-date list-name="facilityContactMechPurposes"/>
- <first-from-list entry-name="facilityContactMechPurpose" list-name="facilityContactMechPurposes"/>
- <set from-field="facilityContactMechPurpose.contactMechId" field="shipment.destinationTelecomNumberId"/>
+ <!-- This check is necessary or some random contactMechId might be filled in by minilang, possibly from another call earlier, if facilityContactMechPurpoess is indeed null.
+ It should probably be implemented for all of the above but I have not had a chance to test it. (Si) -->
+ <if-not-empty field-name="facilityContactMechPurposes">
+ <first-from-list entry-name="facilityContactMechPurpose" list-name="facilityContactMechPurposes"/>
+ <set from-field="facilityContactMechPurpose.contactMechId" field="shipment.destinationTelecomNumberId"/>
+ </if-not-empty>
</if-empty>
</if-not-empty>