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:50:00 UTC
[jira] [Closed] (OFBIZ-13571) Mini-lang to Groovy regressions in QuoteServicesScript
[ https://issues.apache.org/jira/browse/OFBIZ-13571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mridul Pathak closed OFBIZ-13571.
---------------------------------
Fix Version/s: Upcoming Branch
24.09.08
Resolution: Fixed
> Mini-lang to Groovy regressions in QuoteServicesScript
> ------------------------------------------------------
>
> Key: OFBIZ-13571
> URL: https://issues.apache.org/jira/browse/OFBIZ-13571
> Project: OFBiz
> Issue Type: Bug
> Components: order
> Affects Versions: Upcoming Branch, 24.09.07
> Reporter: Mridul Pathak
> Assignee: Mridul Pathak
> Priority: Major
> Fix For: Upcoming Branch, 24.09.08
>
>
> An audit of QuoteServicesScript.groovy against the original MiniLang implementation in QuoteServices.xml revealed several regressions and bugs introduced during the migration:
> 1. copyQuoteItem:
> - When parameters.quoteIdTo is omitted (standard when copying an item within the same quote), input.quoteId is overwritten with null instead of preserving quoteItem.quoteId, causing createQuoteItem to fail.
> - When copying quote adjustments, parameters.quoteIdTo and parameters.quoteItemSeqIdTo are passed directly. When target IDs are auto-generated, these are null, causing createQuoteAdjustment to fail.
> - copyQuoteItem should return the target quoteId and quoteItemSeqId.
> 2. createQuoteFromCustRequest:
> - Accesses custRequest.custRequestTypeId before verifying that custRequest exists, resulting in a NullPointerException when a non-existent custRequestId is passed.
> - Unconditionally attempts to create quote roles for all CustRequestParty records. Since createQuote already assigns the REQ_TAKER role, this causes a duplicate primary key error on QuoteRole when a REQ_TAKER party is present.
> - Variable exprdCond is assigned without a type declaration, leaking into the script binding.
> 3. updateQuote:
> - Evaluates quote.statusId without checking if quote exists, throwing a NullPointerException if a non-existent quoteId is passed.
> 4. createQuoteItem:
> - Passes the entire parameters map to from('Product').where(parameters) instead of scoping the condition to productId.
> 5. createQuoteNote:
> - Swallows the underlying error returned by createNote with a generic message and does not verify noteId presence before attempting to persist QuoteNote.
> 6. Missing UI Labels:
> - OrderQuoteDoesNotExists and OrderQuoteItemDoesNotExists are referenced in QuoteServicesScript.groovy but missing from OrderErrorUiLabels.xml.
> - In copyQuoteItem and autoUpdateQuotePrice, the label lookup refers to OrderUiLabels instead of OrderErrorUiLabels.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)