You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2026/10/09 07:20:00 UTC
[jira] [Commented] (OFBIZ-13662) Fix two regressions in ShoppingListServicesScript.groovy
[ https://issues.apache.org/jira/browse/OFBIZ-13662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18125387#comment-18125387 ]
ASF subversion and git services commented on OFBIZ-13662:
---------------------------------------------------------
Commit 708850634832064c87604352a9a61226b56186be in ofbiz-framework's branch refs/heads/trunk from Mridul Pathak
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=7088506348 ]
Fixed: Regressions in ShoppingListServicesScript.groovy introduced by the mini-lang conversion (OFBIZ-13662)
The Groovy conversion of ShoppingListServices.xml changed the behaviour of two services. Restore the mini-lang behaviour:
- addSuggestionsToShoppingList: for a variant product, link the complements of the virtual product (productId of the variant ProductAssoc) instead of re-linking the complements of the variant itself
- createShoppingListItem: treat a missing quantity as zero when adding to an existing shopping list item
> Fix two regressions in ShoppingListServicesScript.groovy
> --------------------------------------------------------
>
> Key: OFBIZ-13662
> URL: https://issues.apache.org/jira/browse/OFBIZ-13662
> Project: OFBiz
> Issue Type: Bug
> Components: order
> Affects Versions: Upcoming Branch, 24.09.07
> Reporter: Mridul Pathak
> Assignee: Mridul Pathak
> Priority: Minor
>
> *1. {{addSuggestionsToShoppingList}} adds the wrong complements.* For a variant product it calls {{linkProductToShoppingList(virtualProductAssoc.productIdTo, ...)}}; {{productIdTo}} is the variant itself, so it re-runs the variant's own complements. The mini-lang looked up the complements of the virtual product ({{virtualProductAssoc.productId}}). Present since the conversion ({{de1e9e4bb4}}); only affects stores with {{enableAutoSuggestionList}}.
> *2. {{createShoppingListItem}} fails on a null quantity.* Since OFBIZ-12828 the merge branch evaluates {{shoppingListItem.quantity + parameters.quantity}} without the {{?: 0.0}} guards the converted script had, so a missing quantity throws instead of adding zero.
> h3. Fix
> Pass {{virtualProductAssoc.productId}}; restore the null defaults.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)