Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0040970Openbravo ERP02. Master data managementpublic2019-05-29 12:572019-06-18 01:43
Leyre 
AugustoMauch 
highmajoralways
closedfixed 
5
 
3.0PR19Q3 
caristu
Core
No
0040970: Manage Variants - incorrect filter in the "Characteristic Description"
When "Manage Variants", in the preview screen if it is filtered by "Characteristic Description", all the product characteristics are displayed, even they do not belong to the product or the characteristics are deactivated.
1. "Product Characteristic" window:
   1.1 Define a new characteristic variant =yes
       - Navigate to values tab and create three values
       - Navigate to subset tab and create one subset
          - Navigate to subset value tab and add two of the values defined in characteristic values.

2. Create a new product:
   2.1 Is generic = yes
   2.2 Add in "Characteristics" tab, the previous defined: variant = yes and "Characteristic Subset" = the defined.

3. Confirm that the "Characteristic Configuration" is automatically completed

4. "Manage Variants" -> A new screen is opened with the characteristics filtered correctly.

5. Open the filter "Characteristic Description" and verify that there are characteristics that do not belong to the product. In addition, if you deactivate in the "Characteristic Configuration" a value, it also appears.
No tags attached.
Issue History
2019-05-29 12:57LeyreNew Issue
2019-05-29 12:57LeyreAssigned To => Triage Finance
2019-05-29 12:57LeyreModules => Core
2019-05-29 12:57LeyreResolution time => 1560895200
2019-05-29 12:57LeyreTriggers an Emergency Pack => No
2019-05-29 13:02LeyreNote Added: 0112223
2019-05-29 13:06PracticsIssue Monitored: Practics
2019-05-29 17:01SandrahuguetAssigned ToTriage Finance => platform
2019-05-29 17:01SandrahuguetSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=18840#r18840
2019-05-29 17:07SandrahuguetSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=18841#r18841
2019-06-10 12:22hgbotCheckin
2019-06-10 12:22hgbotNote Added: 0112533
2019-06-10 12:22hgbotStatusnew => resolved
2019-06-10 12:22hgbotResolutionopen => fixed
2019-06-10 12:22hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/068fd9f40e7a98d4fca6b95d923ae706bc71e82b [^]
2019-06-10 12:23AugustoMauchReview Assigned To => caristu
2019-06-10 12:23AugustoMauchAssigned Toplatform => AugustoMauch
2019-06-10 21:15hudsonbotCheckin
2019-06-10 21:15hudsonbotNote Added: 0112559
2019-06-11 11:20hgbotCheckin
2019-06-11 11:20hgbotNote Added: 0112574
2019-06-12 13:00hudsonbotCheckin
2019-06-12 13:00hudsonbotNote Added: 0112631
2019-06-12 15:23LeyreNote Added: 0112644
2019-06-17 13:33caristuNote Added: 0112820
2019-06-17 15:54hgbotCheckin
2019-06-17 15:54hgbotNote Added: 0112830
2019-06-17 15:54hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/068fd9f40e7a98d4fca6b95d923ae706bc71e82b [^] => http://code.openbravo.com/erp/devel/pi/rev/3880826d0ca20d92eac8e26540b4615eb76ac10c [^]
2019-06-17 16:03caristuNote Added: 0112834
2019-06-17 16:03caristuStatusresolved => closed
2019-06-17 16:03caristuFixed in Version => 3.0PR19Q3
2019-06-18 01:43hudsonbotCheckin
2019-06-18 01:43hudsonbotNote Added: 0112844

Notes
(0112223)
Leyre   
2019-05-29 13:02   
In this case, the client has many defined characteristics, so the search in the indicated filter is complicated.
(0112533)
hgbot   
2019-06-10 12:22   
Repository: erp/devel/pi
Changeset: 068fd9f40e7a98d4fca6b95d923ae706bc71e82b
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Jun 10 11:30:33 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/068fd9f40e7a98d4fca6b95d923ae706bc71e82b [^]

Fixes issue 40970: Manager Variants has now proper prod characteristics filter

The ProductCharacteristicsDS was not able to build a proper where clause when the product characteristics
filter was part of a grid in a process definition window.

A new hook called ProductCharacteristicCustomWhereClause has been added, where it is possible to define
custom where clauses for each Process Definition that contains a grid with a product characteristics
filter.

For that hook to work, the request to ProductCharacteristicCustomWhereClause now includes the process id
and the context info of the tab that owns the process definition button, if applicable.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-characteristics.js
M src/org/openbravo/materialmgmt/ProductCharacteristicsDS.java
A src/org/openbravo/materialmgmt/ManageVariantsCustomProductCharacteristicWhereClause.java
A src/org/openbravo/materialmgmt/ProductCharacteristicCustomWhereClause.java
---
(0112559)
hudsonbot   
2019-06-10 21:15   
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/566a6f94c8c2 [^]
Maturity status: Test
(0112574)
hgbot   
2019-06-11 11:20   
Repository: erp/devel/pi
Changeset: e8a97db0f525d8a4fbdd63c53d2cb00a06e413e2
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Jun 11 11:19:42 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e8a97db0f525d8a4fbdd63c53d2cb00a06e413e2 [^]

Related with issue 40970: Manage Variants PC filter takes subsets into account

The custom where clause for the Manage Variants product characteristic filter was not taking
characteristic subsets into account. Now if the product characteristic does not reference a subset
the filter will return all its values, and if it references a subset it will return only the
values that belong to the subset.

---
M src/org/openbravo/materialmgmt/ManageVariantsCustomProductCharacteristicWhereClause.java
---
(0112631)
hudsonbot   
2019-06-12 13: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/e330da816783 [^]
Maturity status: Test
(0112644)
Leyre   
2019-06-12 15:23   
The customer has validated the correct behavior of the patches.
(0112820)
caristu   
2019-06-17 13:33   
CR comments:

- Declare ManageVariantsCustomProductCharacteristicWhereClause as @ApplicationScoped. It will not inherit the scope from the interface.
 
- ¿Use dsRequest instead of arguments when invoking Super transformRequest? Maybe it is a bit more readable...
(0112830)
hgbot   
2019-06-17 15:54   
Repository: erp/devel/pi
Changeset: 3880826d0ca20d92eac8e26540b4615eb76ac10c
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Jun 17 15:51:58 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/3880826d0ca20d92eac8e26540b4615eb76ac10c [^]

Fixes issue 40970: Uses ApplicationScoped properly, makes code more clear

The @ApplicationScoped annotation is not inherited, so it must be included in the subclasses, not
in the interface definition.

Also, replaces:

return this.Super('transformRequest', arguments);

With:

return this.Super('transformRequest', dsRequest);

To make the code more clear.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-characteristics.js
M src/org/openbravo/materialmgmt/ManageVariantsCustomProductCharacteristicWhereClause.java
M src/org/openbravo/materialmgmt/ProductCharacteristicCustomWhereClause.java
---
(0112834)
caristu   
2019-06-17 16:03   
Reviewed + tested OK.
(0112844)
hudsonbot   
2019-06-18 01:43   
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/e00500bb8de5 [^]
Maturity status: Test