You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Mridul Pathak (Jira)" <ji...@apache.org> on 2026/09/11 13:51:00 UTC
[jira] [Created] (OFBIZ-13572) Mini-lang to Groovy regressions in ContactMechServicesScript
Mridul Pathak created OFBIZ-13572:
-------------------------------------
Summary: Mini-lang to Groovy regressions in ContactMechServicesScript
Key: OFBIZ-13572
URL: https://issues.apache.org/jira/browse/OFBIZ-13572
Project: OFBiz
Issue Type: Bug
Components: party
Affects Versions: 24.09.07, Upcoming Branch
Reporter: Mridul Pathak
Assignee: Mridul Pathak
An audit of ContactMechServicesScript.groovy against the original MiniLang implementation in ContactMechServices.xml revealed several regressions and error handling bugs introduced during the migration:
1. updateEmailAddress:
- Invokes updateContactMech without checking for service errors. If updateContactMech fails (e.g. contactMechId does not exist), the error is discarded and a success response is returned with contactMechId: null.
2. updatePostalAddress and updateTelecomNumber:
- Neither the create nor the update branches check for service errors from the sub-services (createPostalAddress, createTelecomNumber, updateContactMech). On failure, contactMechId is null and a success response is erroneously returned.
- The entity queries pass the entire parameters map instead of scoping the lookup condition to contactMechId.
3. createPostalAddress and createTelecomNumber:
- Invoke createContactMech without checking for service errors. If createContactMech returns an error, newValue.create() is called with a null contactMechId, causing an unhandled database exception rather than returning the service error cleanly.
4. createEmailAddress and updateContactMech:
- Invoke createContactMech without checking for service errors, returning success with contactMechId: null on failure.
- In updateContactMech, if parameters.contactMechTypeId is omitted, the success message falls back to a generic default instead of utilizing the known contactMechTypeId from the existing record.
5. updateFtpAddressWithHistory:
- Variable newValue is assigned without a type declaration, polluting the script binding.
- Sub-service errors from createFtpAddress and updateContactMech are not checked before returning success.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)