This is an automated email from the ASF dual-hosted git repository.
mridulpathak pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push:
new 981dd59894 Fixed: createUpdateCustomerAndShippingAddress leaves
shipToAddressCtx.partyId stale after a new party is created (OFBIZ-13565)
981dd59894 is described below
commit 981dd598942dd06fdf1fbe8e4e2f1f8805e0adae
Author: Mridul Pathak <[email protected]>
AuthorDate: Tue Sep 8 12:36:12 2026 +0530
Fixed: createUpdateCustomerAndShippingAddress leaves
shipToAddressCtx.partyId stale after a new party is created (OFBIZ-13565)
createUpdatePersonCtx and shipToAddressCtx both alias parameters, but after
createUpdatePerson returns the newly-created party's ID, only the local partyId
variable was updated - parameters.partyId (and thus shipToAddressCtx.partyId)
stayed null. createUpdateShippingAddress then read that stale null partyId, and
createPartyPostalAddress failed inserting PartyContactMech with a NULL
PARTY_ID. Refreshing parameters.partyId right after createUpdatePerson returns
keeps shipToAddressCtx co [...]
---
.../src/main/groovy/org/apache/ofbiz/order/order/CheckoutServices.groovy | 1 +
1 file changed, 1 insertion(+)
diff --git
a/applications/order/src/main/groovy/org/apache/ofbiz/order/order/CheckoutServices.groovy
b/applications/order/src/main/groovy/org/apache/ofbiz/order/order/CheckoutServices.groovy
index 47977a538d..b4906b6d2e 100644
---
a/applications/order/src/main/groovy/org/apache/ofbiz/order/order/CheckoutServices.groovy
+++
b/applications/order/src/main/groovy/org/apache/ofbiz/order/order/CheckoutServices.groovy
@@ -57,6 +57,7 @@ Map createUpdateCustomerAndShippingAddress() {
createUpdatePersonCtx.partyId = partyId
Map serviceResultCUP = run service: 'createUpdatePerson', with:
createUpdatePersonCtx
partyId = serviceResultCUP.partyId
+ parameters.partyId = partyId
Map partyRoleCtx = [partyId: partyId, roleTypeId: 'CUSTOMER']
if (userLogin) {