Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0024287Openbravo ERPA. Platformpublic2013-07-08 19:192017-03-15 20:18
Xpand-IT 
platform 
normalmajoralways
closedopen 
107
3.0MP24 
3.0PR17Q2 
caristu
Google Chrome
Core
No
0024287: Event Handler runs 2 times when the change is made by another Event Handler
When an handler changes a child instance with an handler, this second handler runs 2 times.
Create an Handler for an entity that changes a child entity.
Create an Handler for that child entity.
Change the parent entity.
The second handler runs 2 times.
No tags attached.
duplicate of defect 0035060 closed alostale EntityPersistanceEventObservers are executed twice on commitAndClose 
related to defect 0022011 closed mtaal Can't change Invoice Lines in a Business Handler when the Invoice is changed 
related to design defect 0027903 new Triage Platform Base Not possible to assign a characteristic subset having a tab under the [Characteristic Configuration] tab 
related to design defect 0029477 acknowledged Triage Platform Base It is necessary to mark the link to parent checkbox to add a child instance from an event handler 
diff testIssue24287.diff (5,353) 2013-07-31 14:03
https://issues.openbravo.com/file_download.php?file_id=6306&type=bug
Issue History
2013-07-08 19:19Xpand-ITNew Issue
2013-07-08 19:19Xpand-ITAssigned To => AugustoMauch
2013-07-08 19:19Xpand-ITWeb browser => Google Chrome
2013-07-08 19:19Xpand-ITModules => Core
2013-07-08 19:19Xpand-ITTriggers an Emergency Pack => No
2013-07-08 19:20Xpand-ITNote Added: 0059930
2013-07-31 14:03AugustoMauchFile Added: testIssue24287.diff
2013-07-31 14:08AugustoMauchNote Added: 0060423
2013-08-01 09:45shankarbAssigned ToAugustoMauch => shankarb
2014-09-03 08:14shankarbAssigned Toshankarb => AugustoMauch
2015-01-27 10:25alostaleRelationship addedrelated to 0022011
2015-01-27 10:26alostaleRelationship addedrelated to 0027903
2015-03-17 14:38alostaleAssigned ToAugustoMauch => platform
2015-11-10 14:33alostaleWeb browserGoogle Chrome => Google Chrome
2015-11-10 14:33alostaleStatusnew => acknowledged
2015-11-10 14:33alostaleTypedefect => design defect
2015-11-10 14:34alostaleRelationship addedrelated to 0029477
2017-01-26 14:21alostaleRelationship addedrelated to 0035060
2017-01-30 16:24hgbotCheckin
2017-01-30 16:24hgbotNote Added: 0093938
2017-01-30 16:25caristuStatusacknowledged => scheduled
2017-01-30 16:27caristuReview Assigned To => caristu
2017-01-30 16:27caristuStatusscheduled => closed
2017-01-30 16:27caristuWeb browserGoogle Chrome => Google Chrome
2017-01-30 16:27caristuTarget Version => 3.0PR17Q2
2017-01-30 16:27caristuWeb browserGoogle Chrome => Google Chrome
2017-01-30 16:27caristuFixed in Version => 3.0PR17Q2
2017-01-30 16:27caristuTarget Version3.0PR17Q2 =>
2017-01-30 16:28caristuRelationship deletedrelated to 0035060
2017-01-30 16:28caristuRelationship addedduplicate of 0035060
2017-03-15 20:18hudsonbotCheckin
2017-03-15 20:18hudsonbotNote Added: 0095139

Notes
(0059930)
Xpand-IT   
2013-07-08 19:20   
This issue may be related to https://issues.openbravo.com/view.php?id=22011 [^]
(0060423)
AugustoMauch   
2013-07-31 14:08   
To test it:
- Apply the attached patch. It will create two event handlers, one for the Country entity and another one for its Region child entity. The Country event handler will modify the description of one of its region by appending an underscore, if it has any. The Region event handler will has log the regions name
- As System Administrator, open the Country and Region window.
- Select a country with regions (i.e. United Kingdom) and change any of its fields (i.e. IBAN length) and save. Notice that the Region event handler is executed twice (the same line is added twice to the log).
(0093938)
hgbot   
2017-01-30 16:24   
Repository: erp/devel/pi
Changeset: 1c88fb99f5433041ad708aac2b65afa05d2aec5f
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Mon Jan 30 16:19:24 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/1c88fb99f5433041ad708aac2b65afa05d2aec5f [^]

related to bug 24287: observer run once when changes come from another observer
The fix for issue 0035060 is solving also issue 0024287. With this changeset, we are adding two new test cases to cover the scenario of an observed being executed because of changes done with another observer. In those two cases, we are checking that each observer is being executed just once.

---
M modules/org.openbravo.client.application/src-test/org/openbravo/client/application/test/event/DatasourceEventObserver.java
M modules/org.openbravo.client.application/src-test/org/openbravo/client/application/test/event/ObserverBaseTest.java
M modules/org.openbravo.client.application/src-test/org/openbravo/client/application/test/event/OrderLineTestObserver.java
A modules/org.openbravo.client.application/src-test/org/openbravo/client/application/test/event/OrderTestObserver.java
---
(0095139)
hudsonbot   
2017-03-15 20:18   
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/54e102bef53e [^]
Maturity status: Test