svn commit: r1846594 - /ofbiz/ofbiz-framework/trunk/applications/manufacturing/groovyScripts/bom/FindProductBom.groovy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1846594 - /ofbiz/ofbiz-framework/trunk/applications/manufacturing/groovyScripts/bom/FindProductBom.groovy

jleroux@apache.org
Author: jleroux
Date: Wed Nov 14 17:31:27 2018
New Revision: 1846594

URL: http://svn.apache.org/viewvc?rev=1846594&view=rev
Log:
Fixed: Manufacturing BOM search returning duplicate entries in search results
(OFBIZ-10648)

Bill of Materials search returning duplicate entries in search results.

Test Steps:
1. Login to Manufacturing application.
2. Navigate to Bill of Materials tab.
3. Observe the issue in Search results.

Expected Result:
Unique products should be displayed on Bill of Materials search results.
Actual Result:
Bill of Materials search returning duplicate entries in search results.
The distinct constraint is missing in FindProductBom.groovy find query.

Thanks: Aditya Barve

Modified:
    ofbiz/ofbiz-framework/trunk/applications/manufacturing/groovyScripts/bom/FindProductBom.groovy

Modified: ofbiz/ofbiz-framework/trunk/applications/manufacturing/groovyScripts/bom/FindProductBom.groovy
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/manufacturing/groovyScripts/bom/FindProductBom.groovy?rev=1846594&r1=1846593&r2=1846594&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/manufacturing/groovyScripts/bom/FindProductBom.groovy (original)
+++ ofbiz/ofbiz-framework/trunk/applications/manufacturing/groovyScripts/bom/FindProductBom.groovy Wed Nov 14 17:31:27 2018
@@ -41,7 +41,7 @@ if (parameters.productAssocTypeId) {
 bomListIterator = select("productId", "internalName", "productAssocTypeId")
                     .from("ProductAndAssoc")
                     .where(condList)
-                    .orderBy("productId", "productAssocTypeId")
+                    .orderBy("productId", "productAssocTypeId").distinct()
                     .cursorScrollInsensitive()
                     .cache(true)
                     .queryIterator()