Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035075Openbravo ERPA. Platformpublic2017-01-30 09:012017-03-15 20:18
alostale 
alostale 
normaltrivialhave not tried
closedfixed 
5
 
3.0PR17Q2 
caristu
Core
No
0035075: PersistanceObserver can fail if other observers for OrderLine are present
PersistanceObserver test cases fail if there are observers for new order line assuming order is set on save.

The problem is caused because these test cases save partially created order lines that don't link to any order just to check save observer is executed, because there are other observers with this assumption they throw NPE.
1. Install org.openbravo.materialmgmt.freightmgmt
2. Execute PersistanceObserver
  -> It fails with NPE
No tags attached.
related to defect 0035060 closed alostale EntityPersistanceEventObservers are executed twice on commitAndClose 
related to defect 0035076 closed alostale if test leaves admin mode, following test cases fail 
Issue History
2017-01-30 09:01alostaleNew Issue
2017-01-30 09:01alostaleAssigned To => platform
2017-01-30 09:01alostaleModules => Core
2017-01-30 09:01alostaleTriggers an Emergency Pack => No
2017-01-30 09:01alostaleRelationship addedrelated to 0035060
2017-01-30 09:02alostaleAssigned Toplatform => alostale
2017-01-30 09:16alostaleReview Assigned To => caristu
2017-01-30 09:20alostaleRelationship addedrelated to 0035076
2017-01-30 09:24hgbotCheckin
2017-01-30 09:24hgbotNote Added: 0093914
2017-01-30 09:24hgbotStatusnew => resolved
2017-01-30 09:24hgbotResolutionopen => fixed
2017-01-30 09:24hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/704ea44ad8adc758f461faea40ebce3cdbaf354c [^]
2017-01-30 10:56caristuNote Added: 0093921
2017-01-30 10:56caristuStatusresolved => closed
2017-01-30 10:56caristuFixed in Version => 3.0PR17Q2
2017-03-15 20:18hudsonbotCheckin
2017-03-15 20:18hudsonbotNote Added: 0095135

Notes
(0093914)
hgbot   
2017-01-30 09:24   
Repository: erp/devel/pi
Changeset: 704ea44ad8adc758f461faea40ebce3cdbaf354c
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon Jan 30 09:04:49 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/704ea44ad8adc758f461faea40ebce3cdbaf354c [^]

fixed bug 35075: PersistanceObserver fails if there're observers for OrderLine

  When there are other observers for order line assuming order line has order set
  on save, they can fail.

  Now when new order lines are created, a random order is assigned to them.

---
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/PersistanceObserver.java
---
(0093921)
caristu   
2017-01-30 10:56   
Code reviewed + tested OK.
(0095135)
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