Openbravo Issue Tracking System - Modules
View Issue Details
0036191ModulesRemittancepublic2017-06-07 13:222017-06-14 16:58
adrianromero 
collazoandy4 
urgenttrivialhave not tried
closedfixed 
5
 
 
aferraz
0036191: Functional validations in REM_RemittanceProcess are logged as exceptions in the log
Some functional validations in REM_RemittanceProcess are logged as exceptions in the openbravo log. For example:

https://code.openbravo.com/erp/mods/org.openbravo.module.remittance/file/0bd5fbb29b52/src/org/openbravo/module/remittance/process/REM_RemittanceProcess.java#l225 [^]

But other validations are managed returning an error:

https://code.openbravo.com/erp/mods/org.openbravo.module.remittance/file/0bd5fbb29b52/src/org/openbravo/module/remittance/process/REM_RemittanceProcess.java#l186 [^]

From the functional perspective both validations are managed the same way, an error message is displayed to the user.

This happens not only in this process. Several processes in the application manage functional validations throwing exceptions that are logged in the openbravo log with error level.
Go to the window "Remittance" select one record and press "Process"
Force the code in REM_RemittanceProcess to throw an exception
Verify an error message is displayed to the user and the exception is logged.
Return an OBError result instead of throwing an exception.
SER-QA
depends on defect 00314513.0PR16Q1 closed aferraz Openbravo ERP Error should not be logged in case we throw an OBException with logException parameter as false 
blocks design defect 0036162 acknowledged Triage Platform Base Openbravo ERP clean up openbravo.log 
Issue History
2017-06-07 13:22adrianromeroNew Issue
2017-06-07 13:22adrianromeroAssigned To => Triage Finance
2017-06-07 13:22adrianromeroModules => Core
2017-06-07 13:22adrianromeroResolution time => 1497996000
2017-06-07 13:22adrianromeroTriggers an Emergency Pack => No
2017-06-07 13:23adrianromeroTag Attached: SER-QA
2017-06-07 13:24adrianromeroModulesCore => Advanced Payables and Receivables Mngmt
2017-06-07 13:45aferrazProjectOpenbravo ERP => Modules
2017-06-07 13:45aferrazCategory09. Financial management => Remittance
2017-06-08 12:47alostaleRelationship addedblocks 0036162
2017-06-13 09:30aferrazNote Added: 0097341
2017-06-13 09:30aferrazSeveritymajor => trivial
2017-06-13 17:42aferrazNote Added: 0097367
2017-06-14 15:52collazoandy4Statusnew => scheduled
2017-06-14 15:53collazoandy4Assigned ToTriage Finance => collazoandy4
2017-06-14 15:53collazoandy4Note Added: 0097392
2017-06-14 16:56hgbotCheckin
2017-06-14 16:56hgbotNote Added: 0097394
2017-06-14 16:56hgbotStatusscheduled => resolved
2017-06-14 16:56hgbotResolutionopen => fixed
2017-06-14 16:56hgbotFixed in SCM revision => http://code.openbravo.com/erp/mods/org.openbravo.module.remittance/rev/72b88bcbbf1c94a3778f7bac821f8c0c47dc30f1 [^]
2017-06-14 16:56hgbotCheckin
2017-06-14 16:56hgbotNote Added: 0097395
2017-06-14 16:56aferrazReview Assigned To => aferraz
2017-06-14 16:56aferrazNote Added: 0097396
2017-06-14 16:56aferrazStatusresolved => closed
2017-06-14 16:58aferrazRelationship addeddepends on 0031451

Notes
(0097341)
aferraz   
2017-06-13 09:30   
Moved to Trivial:

As we don't have a clear logging guidelines right now, this kind of issues can not be considered as real defects.
Product team will check if it makes sense to fix it or not.
(0097367)
aferraz   
2017-06-13 17:42   
Possible solution:

Add logException parameter = false when creating OBException.
(0097392)
collazoandy4   
2017-06-14 15:53   
Test Plan
  Go to the Remittance window and select one record and clic on Process button
  Force the code in REM_RemittanceProcess to throw an exception and check no error is logged.
(0097394)
hgbot   
2017-06-14 16:56   
Repository: erp/mods/org.openbravo.module.remittance
Changeset: 72b88bcbbf1c94a3778f7bac821f8c0c47dc30f1
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Tue Jun 13 23:36:25 2017 -0400
URL: http://code.openbravo.com/erp/mods/org.openbravo.module.remittance/rev/72b88bcbbf1c94a3778f7bac821f8c0c47dc30f1 [^]

Fixes issue 36191: Avoid logging functional validations in REM_RemittanceProcess

Some functional validations in REM_RemittanceProcess are logged as exceptions in
the openbravo log.

Now the exceptions use the logException param indicating that no log is required
for this exception.

---
M src/org/openbravo/module/remittance/process/REM_RemittanceProcess.java
---
(0097395)
hgbot   
2017-06-14 16:56   
Repository: erp/mods/org.openbravo.module.remittance
Changeset: 4715f5a76dc6cc6f397d71c95ae728b66219139a
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Wed Jun 14 16:52:02 2017 +0200
URL: http://code.openbravo.com/erp/mods/org.openbravo.module.remittance/rev/4715f5a76dc6cc6f397d71c95ae728b66219139a [^]

Related to issue 36191: Update module version

---
M src-db/database/sourcedata/AD_MODULE.xml
---
(0097396)
aferraz   
2017-06-14 16:56   
Code review OK