Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0031857Openbravo ERP09. Financial managementpublic2016-01-11 12:292016-03-17 10:54
ioritzCia 
aferraz 
highmajoralways
closedfixed 
5
 
 
vmromanos
Core
No
0031857: End year close does not handle well connections when using EndYearCloseUtilityData.updateClose
There is an error when handling connections in src/org/openbravo/erpCommon/businessUtility/EndYearCloseUtility.java file whe using EndYearCloseUtilityData.updateClose method. This method receives the connection as an argument and that connection is not automatically handled. In the following lines:

if (EndYearCloseUtilityData.updateClose(con, conn, vars.getUser(), strYearId, strOrgId) == 0) {
   String strAllPeriodsErr = Utility.messageBD(conn, "AllPeriodsPermanentClosed",
   vars.getLanguage());
   return Utility.translateError(conn, vars, vars.getLanguage(), strAllPeriodsErr);
}

When the return statement is executed, the connection is not handled as the command to handle it is about 5 lines below, but it does not get executed.

This problem happens more than once in this file, all of them should be fixed.
Close the year.
No tags attached.
Issue History
2016-01-11 12:29ioritzCiaNew Issue
2016-01-11 12:29ioritzCiaAssigned To => Triage Finance
2016-01-11 12:29ioritzCiaModules => Core
2016-01-11 12:29ioritzCiaTriggers an Emergency Pack => No
2016-01-11 12:38ioritzCiaDescription Updatedbug_revision_view_page.php?rev_id=10593#r10593
2016-01-12 18:22gorka_gilIssue Monitored: egoitz
2016-01-13 16:00egoitzResolution time => 1454713200
2016-01-13 17:54aferrazStatusnew => scheduled
2016-01-13 17:54aferrazAssigned ToTriage Finance => aferraz
2016-01-18 15:48hgbotCheckin
2016-01-18 15:48hgbotNote Added: 0083377
2016-01-18 15:48hgbotStatusscheduled => resolved
2016-01-18 15:48hgbotResolutionopen => fixed
2016-01-18 15:48hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/cd58855d10a699136d52538cb80d0fd6a6699927 [^]
2016-01-18 15:48hgbotCheckin
2016-01-18 15:48hgbotNote Added: 0083378
2016-01-18 15:48vmromanosReview Assigned To => vmromanos
2016-01-18 15:48vmromanosNote Added: 0083379
2016-01-18 15:48vmromanosStatusresolved => closed
2016-03-17 10:54hudsonbotCheckin
2016-03-17 10:54hudsonbotNote Added: 0085049
2016-03-17 10:54hudsonbotCheckin
2016-03-17 10:54hudsonbotNote Added: 0085050

Notes
(0083377)
hgbot   
2016-01-18 15:48   
Repository: erp/devel/pi
Changeset: cd58855d10a699136d52538cb80d0fd6a6699927
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu Jan 14 14:51:22 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/cd58855d10a699136d52538cb80d0fd6a6699927 [^]

Fixes issue 31857: End year close does not handle well connections

Update every error return in EndYearCloseUtility with throw new OBException in order to handle every error in catch statement, where it is included the releaseRollbackConnection.

---
M src/org/openbravo/erpCommon/businessUtility/EndYearCloseUtility.java
---
(0083378)
hgbot   
2016-01-18 15:48   
Repository: erp/devel/pi
Changeset: eb8ad8b3ea7d49063bc95db8bb14093f70e45851
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Mon Jan 18 15:27:35 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/eb8ad8b3ea7d49063bc95db8bb14093f70e45851 [^]

Related to issue 31857: code review improvements

processButtonClose() method returns the String ProcessRunError instead of the exception.
Later on this string is evaluated to throw the right exception if necessary

---
M src/org/openbravo/erpCommon/businessUtility/EndYearCloseUtility.java
---
(0083379)
vmromanos   
2016-01-18 15:48   
Code review + testing OK
(0085049)
hudsonbot   
2016-03-17 10:54   
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/b22fb0500156 [^]
Maturity status: Test
(0085050)
hudsonbot   
2016-03-17 10:54   
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/b22fb0500156 [^]
Maturity status: Test