This is an automated email from the ASF dual-hosted git repository.

mridulpathak pushed a commit to branch release24.09
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/release24.09 by this push:
     new c98a5cb8a3 Fixed: createUpdateCustomerAndShippingAddress leaves 
shipToAddressCtx.partyId stale after a new party is created (OFBIZ-13565)
c98a5cb8a3 is described below

commit c98a5cb8a32366dc2fdef4c943780a160ed18392
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 0eda688c53..8f73521ee4 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) {

Reply via email to