Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036109Openbravo ERP01. General setuppublic2017-05-25 16:272017-06-13 10:07
ngarcia 
inigosanchez 
urgentmajoralways
closedfixed 
5
 
3.0PR17Q3 
alostale
Core
No
0036109: If Delete Client Process fails, it does not show any error message and leaves the triggers disabled
If Delete Client Process fails, it does not show any error message and leaves the triggers disabled
As System Admin role:
   Go to Modules window and set Core as In Development
   Go to Tables and Columns window and set ProductCategoryAccounts (M_Product_Category_Acct) as View
   Launch the Delete Client process
   Check Process completed successfully message is shown but the log shows:
   ERROR: null value in column "ad_client_id" violates not-null constraint

   Check all the triggers are disabled. You could use the query from the 'Disabled triggers' alert
It should be displayed that there was an error in the process and all the triggers should be enabled
No tags attached.
related to defect 0037862 closed platform Delete Client process finishes with error if there exists records in OBANALY_Tree_Closure table 
diff deleteClient-fails.diff (453) 2017-06-08 13:02
https://issues.openbravo.com/file_download.php?file_id=10831&type=bug
Issue History
2017-05-25 16:27ngarciaNew Issue
2017-05-25 16:27ngarciaAssigned To => Triage Finance
2017-05-25 16:27ngarciaModules => Core
2017-05-25 16:27ngarciaResolution time => 1497477600
2017-05-25 16:27ngarciaTriggers an Emergency Pack => No
2017-05-25 16:27ngarciaIssue Monitored: networkb
2017-05-25 16:35aferrazAssigned ToTriage Finance => platform
2017-06-02 11:19alostaleStatusnew => acknowledged
2017-06-07 12:23inigosanchezStatusacknowledged => scheduled
2017-06-07 12:23inigosanchezAssigned Toplatform => inigosanchez
2017-06-08 10:45inigosanchezReview Assigned To => alostale
2017-06-08 12:10hgbotCheckin
2017-06-08 12:10hgbotNote Added: 0097212
2017-06-08 12:57inigosanchezNote Added: 0097213
2017-06-08 13:02inigosanchezFile Added: deleteClient-fails.diff
2017-06-08 13:07hgbotCheckin
2017-06-08 13:07hgbotNote Added: 0097215
2017-06-08 13:07hgbotStatusscheduled => resolved
2017-06-08 13:07hgbotResolutionopen => fixed
2017-06-08 13:07hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/97ba8779cc16fa4c91002ca3607624e91ef17adc [^]
2017-06-09 02:49hudsonbotCheckin
2017-06-09 02:49hudsonbotNote Added: 0097260
2017-06-09 02:49hudsonbotCheckin
2017-06-09 02:49hudsonbotNote Added: 0097261
2017-06-09 11:13alostaleNote Added: 0097270
2017-06-09 11:13alostaleStatusresolved => new
2017-06-09 11:13alostaleResolutionfixed => open
2017-06-09 13:08inigosanchezStatusnew => scheduled
2017-06-09 13:09hgbotCheckin
2017-06-09 13:09hgbotNote Added: 0097282
2017-06-09 13:10inigosanchezStatusscheduled => resolved
2017-06-09 13:10inigosanchezResolutionopen => fixed
2017-06-09 22:41hudsonbotCheckin
2017-06-09 22:41hudsonbotNote Added: 0097297
2017-06-13 10:07alostaleNote Added: 0097343
2017-06-13 10:07alostaleStatusresolved => closed
2017-06-13 10:07alostaleFixed in Version => 3.0PR17Q3
2018-02-08 16:33ngarciaRelationship addedrelated to 0037862

Notes
(0097212)
hgbot   
2017-06-08 12:10   
Repository: erp/devel/pi
Changeset: b6c63f6d3908a497ce737cbd1ad4774452899328
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Thu Jun 08 12:09:54 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/b6c63f6d3908a497ce737cbd1ad4774452899328 [^]

Related with issue 36109: deleteClient method cleanup

---
M src/org/openbravo/service/system/SystemService.java
---
(0097213)
inigosanchez   
2017-06-08 12:57   
Alternative steps to reproduce:
- Apply the attached patch in order to raise an error from database in the Delete Client process.
- Create a client for testing purposes from Initial Client Setup process.
- Delete the created client from Delete Client process.
- Note than all the triggers are disabled and the client is not removed properly but a success message is shown.
(0097215)
hgbot   
2017-06-08 13:07   
Repository: erp/devel/pi
Changeset: 97ba8779cc16fa4c91002ca3607624e91ef17adc
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Thu Jun 08 13:06:41 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/97ba8779cc16fa4c91002ca3607624e91ef17adc [^]

Fixed issue 36109: Delete Client process doesn't managed exceptions properly

The problem was that Delete Client process didn't manage exceptions properly. If Delete Client Process
was fail, it did not show any error message and leaved the triggers disabled.For example, if a problem
in the database was raised, the UI was not take into account the problem as expected and the user did
not realize anything.

Now the process does handle exceptions as expected. If the Delete Client process fails, all the
constraints are enabled again. This occurres because enableConstraints method is executed. Now a
messagge is displayed in the UI in order to inform to the user. Besides, if the Delete Client process
fails a rollback is done.

---
M src/org/openbravo/service/system/SystemService.java
---
(0097260)
hudsonbot   
2017-06-09 02:49   
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/682983c2eead [^]
Maturity status: Test
(0097261)
hudsonbot   
2017-06-09 02:49   
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/682983c2eead [^]
Maturity status: Test
(0097270)
alostale   
2017-06-09 11:13   
Reopening due to code review issues, see https://docs.google.com/spreadsheets/d/18l2biKWeG6iGDIPqO6VuYQ_TtP_6YxyQU4KSrPvQlJ8/edit#gid=0 [^]
(0097282)
hgbot   
2017-06-09 13:09   
Repository: erp/devel/pi
Changeset: 359c62f9c661d1afe392c33f36fd399da27b76bc
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Fri Jun 09 13:07:44 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/359c62f9c661d1afe392c33f36fd399da27b76bc [^]

Related with issue 36109: code review improvements related with log

---
M src-db/database/sourcedata/AD_MESSAGE.xml
M src/org/openbravo/erpCommon/ad_process/DeleteClient.java
M src/org/openbravo/service/system/SystemService.java
---
(0097297)
hudsonbot   
2017-06-09 22:41   
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/282dd511870b [^]
Maturity status: Test
(0097343)
alostale   
2017-06-13 10:07   
code reviewed + tested