Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0023060Openbravo ERP01. General setuppublic2013-02-12 19:452013-02-20 04:50
dmiguelez 
AugustoMauch 
immediatecriticalalways
closedfixed 
20Community Appliance
 
3.0MP20 
alostale
Core
Production - QA Approved
2012-10-24
https://code.openbravo.com/erp/devel/pi/rev/08ae440f4c71 [^]
No
0023060: Not possible to import a Client. Event Handlers should be disabled.
Not possible to import a Client.
The problem is that Event Handlers are not disabled before importing the data, event though the Triggers are.
As System.

Delete F&B Client.
Copy the F&B xml file from sampledata to importclient folder.
Import F&B Client.
No tags attached.
related to defect 0023019 closed dmiguelez Error Import Client 
related to defect 0023343 closed iciordia API Change - Event Handlers are disabled while data is being imported 
Issue History
2013-02-12 19:45dmiguelezNew Issue
2013-02-12 19:45dmiguelezAssigned To => AugustoMauch
2013-02-12 19:45dmiguelezModules => Core
2013-02-12 19:45dmiguelezTriggers an Emergency Pack => No
2013-02-12 19:45dmiguelezRelationship addedrelated to 0023019
2013-02-12 19:46dmiguelezRegression level => Production - QA Approved
2013-02-12 19:46dmiguelezRegression date => 2012-10-24
2013-02-12 19:46dmiguelezRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/08ae440f4c71 [^]
2013-02-13 09:42jecharriIssue Monitored: jecharri
2013-02-13 12:57AugustoMauchIssue Monitored: alostale
2013-02-13 12:57AugustoMauchReview Assigned To => alostale
2013-02-13 13:05hgbotCheckin
2013-02-13 13:05hgbotNote Added: 0056413
2013-02-13 13:05hgbotStatusnew => resolved
2013-02-13 13:05hgbotResolutionopen => fixed
2013-02-13 13:05hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/788979b3e20ed755ee3594e7a36c95626f430175 [^]
2013-02-13 13:39alostaleNote Added: 0056414
2013-02-13 13:39alostaleStatusresolved => new
2013-02-13 13:39alostaleResolutionfixed => open
2013-02-13 14:45hgbotCheckin
2013-02-13 14:45hgbotNote Added: 0056415
2013-02-13 14:45hgbotStatusnew => resolved
2013-02-13 14:45hgbotResolutionopen => fixed
2013-02-13 14:45hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/788979b3e20ed755ee3594e7a36c95626f430175 [^] => http://code.openbravo.com/erp/devel/pi/rev/616685f33ea297365f386fcb6322ecc35156a83e [^]
2013-02-14 08:07alostaleNote Added: 0056428
2013-02-14 08:07alostaleStatusresolved => closed
2013-02-14 08:07alostaleFixed in Version => 3.0MP20
2013-02-20 04:50hudsonbotCheckin
2013-02-20 04:50hudsonbotNote Added: 0056590
2013-02-20 04:50hudsonbotCheckin
2013-02-20 04:50hudsonbotNote Added: 0056591
2013-03-19 17:23AugustoMauchRelationship addedrelated to 0023343

Notes
(0056413)
hgbot   
2013-02-13 13:05   
Repository: erp/devel/pi
Changeset: 788979b3e20ed755ee3594e7a36c95626f430175
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Feb 13 13:02:57 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/788979b3e20ed755ee3594e7a36c95626f430175 [^]

Fixes issue 23060: Event handlers disabled when data is being imported

When data is being imported there will be a register in the AD_Session_Status table with the importing column set to true. In that case all event handlers will
 be disabled by means of making the EntityPersistenceEventObserver.isValidEvent method return false.

---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/event/EntityPersistenceEventObserver.java
M src/org/openbravo/erpCommon/utility/Utility.java
---
(0056414)
alostale   
2013-02-13 13:39   
Reopen after code review.

Current fix adds an extra DB query whenever an entity is modified.

This might be replaced by TriggerHandler.getInstance().isDisabled() which checks in session rather than in DB.
(0056415)
hgbot   
2013-02-13 14:45   
Repository: erp/devel/pi
Changeset: 616685f33ea297365f386fcb6322ecc35156a83e
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Feb 13 14:44:20 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/616685f33ea297365f386fcb6322ecc35156a83e [^]

Fixes issue 23060: Disables event handlers using session info

Instead of querying the database each time an event handlers is going to be executed to check is the system is importing data, that information is taken from the session using TriggerHandler.getInstance().isDisabled().

---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/event/EntityPersistenceEventObserver.java
M src/org/openbravo/erpCommon/utility/Utility.java
---
(0056428)
alostale   
2013-02-14 08:07   
Code reviewed + tested on pi@d033d813595f

Executed test plan: imported F&B client
(0056590)
hudsonbot   
2013-02-20 04:50   
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/d828167a9e83 [^]

Maturity status: Test
(0056591)
hudsonbot   
2013-02-20 04:50   
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/d828167a9e83 [^]

Maturity status: Test