Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0032950Openbravo ERP02. Master data managementpublic2016-05-13 11:192016-09-02 14:28
gorkaion 
gorkaion 
normalmajoralways
closedfixed 
20Gentoo
 
pi3.0PR16Q3 
aferraz
Core
No
0032950: VariantChDescUpdateProcess executed several times for the same product
The ProductCharacteristicValueEventHandler event handler calls the VariantChDescUpdateProcess process when a characteristic value related to a product is changed to update the characteristic description field of the product.

This handler should check all the products affected during the transaction and at when the transactions completes successfully call the process to update the products.

But there is an issue and in the same transaction several characteristic values are added to a single product the event handler will call the update process one time for each value added/updated. This is wrong as it should be called only once.
Create a process that adds several characteristic values to a product

debug it to check that the process is called several times.
Store the productIds in a Set instead of a List so it does not add duplicates.
No tags attached.
related to design defect 0033210pi closed gorkaion VariantChDescUpdateProcess executed using ImportEntries instead of ProcessBundle 
Issue History
2016-05-13 11:19gorkaionNew Issue
2016-05-13 11:19gorkaionAssigned To => gorkaion
2016-05-13 11:19gorkaionModules => Core
2016-05-13 11:19gorkaionTriggers an Emergency Pack => No
2016-05-13 11:27gorkaionReview Assigned To => aferraz
2016-05-13 11:28hgbotCheckin
2016-05-13 11:28hgbotNote Added: 0086439
2016-05-13 11:28hgbotStatusnew => resolved
2016-05-13 11:28hgbotResolutionopen => fixed
2016-05-13 11:28hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/ea18c2c210a6216be3b82301047617103d804460 [^]
2016-05-16 14:24aferrazNote Added: 0086466
2016-05-16 14:24aferrazStatusresolved => closed
2016-05-16 14:24aferrazFixed in Version => 3.0PR16Q3
2016-06-17 19:37hudsonbotCheckin
2016-06-17 19:37hudsonbotNote Added: 0087538
2016-08-31 13:21gorkaionRelationship addedrelated to 0033210
2016-09-02 08:49hgbotCheckin
2016-09-02 08:49hgbotNote Added: 0089690
2016-09-02 14:28hudsonbotCheckin
2016-09-02 14:28hudsonbotNote Added: 0089710

Notes
(0086439)
hgbot   
2016-05-13 11:28   
Repository: erp/devel/pi
Changeset: ea18c2c210a6216be3b82301047617103d804460
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Fri May 13 11:26:47 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/ea18c2c210a6216be3b82301047617103d804460 [^]

Fixed issue 32950.Use HashSet instead of ArrayList to avoid duplicates

The product ids are now stored using HashSet as this implementation does not
allow duplicates.

The method to create the vars in some scenarios is throwing a OBException that
is properly catch. It has been changed the try to avoid the OBException and
remove the error message from the logs.

---
M src/org/openbravo/event/ProductCharacteristicValueEventHandler.java
---
(0086466)
aferraz   
2016-05-16 14:24   
Code review OK
(0087538)
hudsonbot   
2016-06-17 19:37   
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/0dc7be081b1c [^]
Maturity status: Test
(0089690)
hgbot   
2016-09-02 08:49   
Repository: erp/devel/pi
Changeset: 992caa87c40b1a96d5fb5bd39711e928b608b061
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Wed Aug 31 15:02:29 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/992caa87c40b1a96d5fb5bd39711e928b608b061 [^]

Fixed issue 33210.Related to issue 32950. Use import entry instead of ProcessBundle

Performance fixes on EventHandler.
- Use import entry instead of ProcessBundle.

---
M src-db/database/sourcedata/AD_REF_LIST.xml
M src/org/openbravo/event/ProductCharacteristicValueEventHandler.java
A src/org/openbravo/materialmgmt/VariantChDescUpdateProcessor.java
---
(0089710)
hudsonbot   
2016-09-02 14:28   
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/0f7167eecae1 [^]
Maturity status: Test