moqui / mantle-usl

Mantle Universal Service Library
http://www.moqui.org/mantle.html
Other
30 stars 61 forks source link

OrderServices.xml:isFulfilled#OrderItem does not work for subscription products #162

Closed eigood closed 3 years ago

eigood commented 3 years ago

See the attached single-line patch. Basically, I got an exception about could not find constructor for ArrayList(String), because "orderItemSeqId" was being set as the list to filter.

With the attached patch, I get an auto-completed order with a valid Subscription row in the database.

==

diff --git a/service/mantle/order/OrderServices.xml b/service/mantle/order/OrderServices.xml
index b52a924..307da4b 100644
--- a/service/mantle/order/OrderServices.xml
+++ b/service/mantle/order/OrderServices.xml
@@ -1340,7 +1340,7 @@ General Order Placement and eCommerce Usage
                             list="productSubscriptionResourceList" cache="true">
                         <econdition field-name="productId" from="product.productId"/></entity-find>
                     <iterate list="productSubscriptionResourceList" entry="productSubscriptionResource">
-                        <filter-map-list list="orderItemSeqId" to-list="currentSubscriptionList">
+                        <filter-map-list list="orderSubscriptionList" to-list="currentSubscriptionList">
                             <field-map field-name="orderItemSeqId" from="orderItem.orderItemSeqId"/>
                             <field-map field-name="subscriptionResourceId" from="productSubscriptionResource.subscriptionResourceId"/>
                         </filter-map-list>

==

jonesde commented 3 years ago

Yep, that's a clear bug... the change is in commit bc7d4b8.