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 44d73d3656 Fixed: Two update() DSL calls pass two arguments to 
EntityUpdateBuilder.where(), which only accepts a Map (OFBIZ-13656)
44d73d3656 is described below

commit 44d73d3656d4d6abf7ad498179ce0a761b696dd5
Author: Mridul Pathak <[email protected]>
AuthorDate: Wed Oct 7 23:39:39 2026 +0530

    Fixed: Two update() DSL calls pass two arguments to 
EntityUpdateBuilder.where(), which only accepts a Map (OFBIZ-13656)
    
    - resetEntitySyncStatus() threw MissingMethodException whenever the sync 
was in ESR_RUNNING, the only case it exists for, so a crashed sync could never 
be reset.
    - setTimeZoneFromBrowser() threw the same exception whenever lastTimeZone 
was empty, so the browser time zone was never stored.
    
    Both were introduced when the update() DSL was adopted (#2018); now pass 
the where-fields as a Map.
---
 .../main/groovy/org/apache/ofbiz/common/SetTimeZoneFromBrowser.groovy   | 2 +-
 .../main/groovy/org/apache/ofbiz/entityext/EntitySyncServices.groovy    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/framework/common/src/main/groovy/org/apache/ofbiz/common/SetTimeZoneFromBrowser.groovy
 
b/framework/common/src/main/groovy/org/apache/ofbiz/common/SetTimeZoneFromBrowser.groovy
index d2de198549..590a42ca5a 100644
--- 
a/framework/common/src/main/groovy/org/apache/ofbiz/common/SetTimeZoneFromBrowser.groovy
+++ 
b/framework/common/src/main/groovy/org/apache/ofbiz/common/SetTimeZoneFromBrowser.groovy
@@ -26,7 +26,7 @@ Map setTimeZoneFromBrowser() {
         GenericValue userLogin = from('UserLogin').where('userLoginId', 
parameters.userLogin.userLoginId).queryOne()
         if (userLogin) {
             if (!userLogin.lastTimeZone || userLogin.lastTimeZone == 'null') {
-                update('UserLogin').where('userLoginId', 
parameters.userLogin.userLoginId).set([lastTimeZone: parameters.localeName])
+                update('UserLogin').where([userLoginId: 
parameters.userLogin.userLoginId]).set([lastTimeZone: parameters.localeName])
                 return ServiceUtil.returnSuccess()
             }
         }
diff --git 
a/framework/entityext/src/main/groovy/org/apache/ofbiz/entityext/EntitySyncServices.groovy
 
b/framework/entityext/src/main/groovy/org/apache/ofbiz/entityext/EntitySyncServices.groovy
index 730e3e7545..45b1f30462 100644
--- 
a/framework/entityext/src/main/groovy/org/apache/ofbiz/entityext/EntitySyncServices.groovy
+++ 
b/framework/entityext/src/main/groovy/org/apache/ofbiz/entityext/EntitySyncServices.groovy
@@ -27,7 +27,7 @@ Map entitySyncPermissionCheck() {
 Map resetEntitySyncStatus() {
     entitySyncRecord = from('EntitySync').where('entitySyncId', 
parameters.entitySyncId).queryOne()
     if (entitySyncRecord && entitySyncRecord.runStatusId == 'ESR_RUNNING') {
-        update('EntitySync').where('entitySyncId', 
parameters.entitySyncId).set([runStatusId: 'ESR_NOT_STARTED'])
+        update('EntitySync').where([entitySyncId: 
parameters.entitySyncId]).set([runStatusId: 'ESR_NOT_STARTED'])
     }
     return success()
 }

Reply via email to