Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0037422
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 09. Financial managementminoralways2017-11-30 10:272018-05-09 19:29
ReporterngarciaView Statuspublic 
Assigned Tomarkmm82 
PriorityhighResolutionfixedFixed in Version3.0PR18Q3
StatusclosedFix in branchFixed in SCM revisioneac492d3b3d2
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toaferraz
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0037422: Reset Accounting finishes with error if it is launched for an org with "Organization" type and the type name has been changed

DescriptionReset Accounting finishes with error if it is launched for an org with "Organization" type and the type name has been changed. Delete accounting entries option should be selected.

The problem is in the following piece of code of ResetAccounting.delete function:

Set<String> orgIds = StringUtils.equals(org.getOrganizationType().getName(), "Organization") ? getLegalOrBusinessOrgsChilds(client, adOrgId) : new OrganizationStructureProvider().getChildTree(adOrgId, true);
Steps To ReproduceAs system admin role:
   Go to Organization Type window and change the name of "Organization" record

As group admin role:
   Launch the Reset Accounting process:
      Client: F&B International Group
      Organization: *
      Delete accounting entries: Y
   Check the following error is shown:
      Delete failed

   The log shows:
      ERROR org.openbravo.common.actionhandler.ResetAccountingHandler - Error in Reset Accounting Action Handler
org.openbravo.base.exception.OBException: Delete failed
    at org.openbravo.financial.ResetAccounting.delete(ResetAccounting.java:210)
    at org.openbravo.financial.ResetAccounting.delete(ResetAccounting.java:58)
    at org.openbravo.common.actionhandler.ResetAccountingHandler.doExecute(ResetAccountingHandler.java:67)...
Caused by: java.lang.NullPointerException
    at org.openbravo.financial.ResetAccounting.delete(ResetAccounting.java:148)
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00330633.0PR16Q3 closedmarkmm82 It should be possible to run "Reset Accounting" process for several organization at once 
related to defect 0038218 closedmarkmm82 'Delete failed' error in Reset Accounting process if it is launched for 'Organization' type org without legal children 

-  Notes
(0100969)
markmm82 (developer)
2017-12-11 16:50

As system admin role:
   Go to Organization Type window and change the name of "Organization" record

As group admin role:
   Launch the Reset Accounting process:
      Client: F&B International Group
      Organization: *
      Delete accounting entries: Y
   Check the process ends successfully with information of the affected records. For instance:
"Number of unposted documents = 3325, Number of deleted journal entries = 16715"
(0103860)
hgbot (developer)
2018-04-12 18:14

Repository: erp/devel/pi
Changeset: eac492d3b3d20f3b684cf5026393dfb138eb69da
Author: Mark <markmm82 <at> gmail.com>
Date: Mon Dec 11 10:45:43 2017 -0500
URL: http://code.openbravo.com/erp/devel/pi/rev/eac492d3b3d20f3b684cf5026393dfb138eb69da [^]

Fixes issue 37422: Reset Accounting finishes with error if it is launched
for an org with "Organization" type and the type name has been changed

As the process was expecting "Organization" as the organization type's name and it
can be changed, the process failed if the name is changed.

To avoid it, comparison is made with the organization type ID instead of the organization
type name, as the ID should not be changed.

---
M src-db/database/sourcedata/OBUISEL_SELECTOR.xml
M src/org/openbravo/financial/ResetAccounting.java
---
(0103861)
aferraz (developer)
2018-04-12 18:16

Code review + Testing OK
(0104381)
hudsonbot (developer)
2018-05-09 19:29

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/2be7d3efe606 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2017-11-30 10:27 ngarcia New Issue
2017-11-30 10:27 ngarcia Assigned To => Triage Finance
2017-11-30 10:27 ngarcia Modules => Core
2017-11-30 10:27 ngarcia Triggers an Emergency Pack => No
2017-11-30 10:27 ngarcia Issue Monitored: networkb
2017-11-30 10:28 ngarcia Description Updated View Revisions
2017-11-30 11:20 ngarcia Relationship added related to 0033063
2017-12-07 17:31 markmm82 Assigned To Triage Finance => markmm82
2017-12-07 17:32 markmm82 Status new => scheduled
2017-12-11 16:50 markmm82 Note Added: 0100969
2018-04-12 18:01 aferraz Relationship added related to 0038218
2018-04-12 18:14 hgbot Checkin
2018-04-12 18:14 hgbot Note Added: 0103860
2018-04-12 18:14 hgbot Status scheduled => resolved
2018-04-12 18:14 hgbot Resolution open => fixed
2018-04-12 18:14 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/eac492d3b3d20f3b684cf5026393dfb138eb69da [^]
2018-04-12 18:16 aferraz Review Assigned To => aferraz
2018-04-12 18:16 aferraz Note Added: 0103861
2018-04-12 18:16 aferraz Status resolved => closed
2018-04-12 18:16 aferraz Fixed in Version => 3.0PR18Q3
2018-05-09 19:29 hudsonbot Checkin
2018-05-09 19:29 hudsonbot Note Added: 0104381


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker