Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0041900
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 07. Sales managementmajoralways2019-09-30 11:272019-12-12 23:00
ReporterfranciscoView Statuspublic 
Assigned ToAugustoMauch 
PriorityhighResolutionfixedFixed in Version3.0PR20Q2
StatusclosedFix in branchFixed in SCM revision4c75a4b806b5
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned ToSandrahuguet
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0041900: In Product Characteristics, the Manage variants filter, in doesn't filter for more than one characteristics

DescriptionIn the tab Characteristics, in Product window, when click in the Manage Variants button it doesn't filter for more than one characteristic.
Steps To ReproduceTested in retail_pi_pgsql:
Go to product window
Create a new product
Click the flag is generic
Go to characteristics tab
Create size and color Characteristics, check the Variant flag.
Add a couple values for each characteristic in the Characteristic Configuration subtab (i.e. Black, Blue for color, M, L for size)
Click in Manage Variant button
Filter by Characteristic Descriptions:
    filter by color first,Black
    It filters ok
    Add a second filter size M
    It is not taking the second filter, only the color

TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0114870)
AugustoMauch (developer)
2019-10-01 10:01

Cannot reproduce issue, when clicking the Manage Variants button the resulting grid appears empty
(0114871)
francisco (developer)
2019-10-01 10:22

Please see attached video with the steps to replicate the issue
(0114872)
francisco (developer)
2019-10-01 10:50

https://drive.google.com/open?id=1SYqk9TwzYFl3jU0YPOYIdHit1DeHsJYK [^]
(0114873)
hgbot (developer)
2019-10-01 11:54

Repository: erp/devel/pi
Changeset: 4c75a4b806b563a36125cf649a9105b5a1d8b571
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Oct 01 11:52:58 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/4c75a4b806b563a36125cf649a9105b5a1d8b571 [^]

Fixes issue 41900: Improves product characteristic filter of Manage Variants

The problem was how the criteria is sent when several characteristics are selected in the product
characteristics filter of the Manage Variantes grid. It looks like this:

 {
   criteria:{
      "isProductCharacteristicsCriteria":true,
      "criteria":[
         {
            "operator":"exists",
            "fieldName":"characteristicDescription",
            "value":[
               "1A510FE566DB4E86A89D89A23ED484A1"
            ],
            "existsQuery":"exists (from ProductCharacteristicValue v where e.product = v.product and v.characteristicValue.id in ($value))"
         },
         {
            "operator":"exists",
            "fieldName":"characteristicDescription",
            "value":[
               "EBBE95AD49DA4C3D9A241DF353583C72"
            ],
            "existsQuery":"exists (from ProductCharacteristicValue v where e.product = v.product and v.characteristicValue.id in ($value))"
         }
      ]
   }
}

Because the Managa Variants datasource is manual, it is limited in the type of filters it supports.
This particular case is fixed by using the inner criteria to filter:

      "criteria":[
         {
            "operator":"exists",
            "fieldName":"characteristicDescription",
            "value":[
               "1A510FE566DB4E86A89D89A23ED484A1"
            ],
            "existsQuery":"exists (from ProductCharacteristicValue v where e.product = v.product and v.characteristicValue.id in ($value))"
         },
         {
            "operator":"exists",
            "fieldName":"characteristicDescription",
            "value":[
               "EBBE95AD49DA4C3D9A241DF353583C72"
            ],
            "existsQuery":"exists (from ProductCharacteristicValue v where e.product = v.product and v.characteristicValue.id in ($value))"
         }
      ]

This replacement is done if there is only one element in the outer criteria, and if it contains isProductCharacteristicsCriteria
property is true.

If there are more elements in the outer criteria, then the incoming criteria is already formatted as the
Manage Variants datasource expects:

criteria: {"fieldName":"name","operator":"iContains","value":"test"}
criteria: {"operator":"exists","fieldName":"characteristicDescription","value":["1A510FE566DB4E86A89D89A23ED484A1"],"existsQuery":"exists (from ProductCharacteristicValue v where e.product = v.product and v.characteristicValue.id in ($value))"}
criteria: {"operator":"exists","fieldName":"characteristicDescription","value":["EBBE95AD49DA4C3D9A241DF353583C72"],"existsQuery":"exists (from ProductCharacteristicValue v where e.product = v.product and v.characteristicValue.id in ($value))"}

---
M src/org/openbravo/materialmgmt/ManageVariantsDS.java
---
(0114880)
Sandrahuguet (developer)
2019-10-01 17:57

code review + testing ok
(0116230)
hudsonbot (developer)
2019-12-12 23:00

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/954d2b7a66fb [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2019-09-30 11:27 francisco New Issue
2019-09-30 11:27 francisco Assigned To => Triage Finance
2019-09-30 11:27 francisco Modules => Core
2019-09-30 11:27 francisco Triggers an Emergency Pack => No
2019-09-30 11:29 Practics Issue Monitored: Practics
2019-09-30 15:42 Sandrahuguet Assigned To Triage Finance => markmm82
2019-09-30 15:43 markmm82 Status new => scheduled
2019-09-30 16:55 Sandrahuguet Status scheduled => feedback
2019-09-30 16:58 Sandrahuguet Status feedback => new
2019-09-30 17:17 Sandrahuguet Assigned To markmm82 => platform
2019-10-01 10:01 AugustoMauch Note Added: 0114870
2019-10-01 10:01 AugustoMauch Assigned To platform => francisco
2019-10-01 10:01 AugustoMauch Status new => feedback
2019-10-01 10:22 francisco Note Added: 0114871
2019-10-01 10:22 francisco Steps to Reproduce Updated View Revisions
2019-10-01 10:47 AugustoMauch Steps to Reproduce Updated View Revisions
2019-10-01 10:47 AugustoMauch Assigned To francisco => AugustoMauch
2019-10-01 10:47 AugustoMauch Status feedback => scheduled
2019-10-01 10:50 francisco Note Added: 0114872
2019-10-01 11:47 AugustoMauch Review Assigned To => Sandrahuguet
2019-10-01 11:54 hgbot Checkin
2019-10-01 11:54 hgbot Note Added: 0114873
2019-10-01 11:54 hgbot Status scheduled => resolved
2019-10-01 11:54 hgbot Resolution open => fixed
2019-10-01 11:54 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/4c75a4b806b563a36125cf649a9105b5a1d8b571 [^]
2019-10-01 17:57 Sandrahuguet Note Added: 0114880
2019-10-01 17:57 Sandrahuguet Status resolved => closed
2019-10-01 17:57 Sandrahuguet Fixed in Version => 3.0PR20Q2
2019-12-12 23:00 hudsonbot Checkin
2019-12-12 23:00 hudsonbot Note Added: 0116230


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker