Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
22.01.01
-
None
Description
Groovy migration
Before migration was
<if-not-empty field="orderPaymentPrefAndPayments"> <log level="info" message="Payment not created for order ${orderHeader.orderId}, at least a single payment already exists"/> <return/> </if-not-empty> )
After migration is
if (from("OrderPaymentPrefAndPayment") .where([EntityCondition.makeCondition("orderId", orderHeader.orderId), EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "PAYMENT_CANCELLED")]) .queryCount() > 1) { return error("Payment not created for order ${orderHeader.orderId}, at least a single payment already exists") }
queryCount() > 1 had to be queryCount() > 0
return error had to be return failure