Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035442Openbravo ERP09. Financial managementpublic2017-03-07 12:132017-03-15 20:21
shuehner 
vmromanos 
normalminorhave not tried
closedfixed 
5
 
 
shuehner
Core
No
0035442: junit test CancelAndReplace is missing to set IsSOTRX value which can cause failure with custom event observers
This junit test does not set the issotrx value explicitely in the testing data it creates.

This can create problems when running the junit test with custom DAL event observers checking that table.

Setting that value explicitely makes the test more robust to not fail in that scenario.
https://ci.openbravo.com/job/mod-simple/11028/testReport/junit/org.openbravo.test.cancelandreplace/CancelAndReplaceTest/CancelAndReplaceTests/ [^]

Showing up for example in custom mod-but-qa-multiserver modules testing job.
-
No tags attached.
Issue History
2017-03-07 12:13shuehnerNew Issue
2017-03-07 12:13shuehnerAssigned To => vmromanos
2017-03-07 12:13shuehnerModules => Core
2017-03-07 12:13shuehnerTriggers an Emergency Pack => No
2017-03-07 12:28vmromanosStatusnew => scheduled
2017-03-07 12:29vmromanosNote Added: 0094786
2017-03-07 12:37hgbotCheckin
2017-03-07 12:37hgbotNote Added: 0094787
2017-03-07 12:37hgbotStatusscheduled => resolved
2017-03-07 12:37hgbotResolutionopen => fixed
2017-03-07 12:37hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/ee35e34cd34b7cbb4bd7460afc288e4366fefcdc [^]
2017-03-07 12:38vmromanosReview Assigned To => shuehner
2017-03-09 10:37shuehnerNote Added: 0094861
2017-03-09 10:37shuehnerStatusresolved => closed
2017-03-15 20:21hudsonbotCheckin
2017-03-15 20:21hudsonbotNote Added: 0095274

Notes
(0094786)
vmromanos   
2017-03-07 12:29   
Test plan:
Run CancelAndReplaceTest in custom mod-but-qa-multiserver modules testing job.
Verify it successfully passes the test.
(0094787)
hgbot   
2017-03-07 12:37   
Repository: erp/devel/pi
Changeset: ee35e34cd34b7cbb4bd7460afc288e4366fefcdc
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Tue Mar 07 12:36:31 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/ee35e34cd34b7cbb4bd7460afc288e4366fefcdc [^]

Fixed bug 35442: Explicity set isSOTRX in netting shipments

The netting shipments were created without explicity setting the isSOTRX information. If not set, the database automatically sets it to Y.
However when an EntityEventObserver is executed, this value is null and could raise a NPE.

Solution sets the isSOTRX value exactly the same as the order from which it was created. Right now it will be always Y, but done this way to reuse this method in purchase flows if necessary.

---
M src/org/openbravo/erpCommon/businessUtility/CancelAndReplaceUtils.java
---
(0094861)
shuehner   
2017-03-09 10:37   
Tested the change in the environment in which the CancelAndReplaceTests junit test before triggered a NullPointerException before in some custom EventObserver.

That error does no longer happen and the tests run sucessfully there.

Talking to assignee about change being in src/ and not just src-test he confirmed that they did already check & review that the change does not break anything else.

Thus closing with both parts being done.
(0095274)
hudsonbot   
2017-03-15 20:21   
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