Openbravo Issue Tracking System - Modules | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0020137 | Modules | APR Migration Tool | public | 2012-03-28 13:46 | 2012-03-28 13:46 |
| Reporter | mirurita | ||||
| Assigned To | mirurita | ||||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | new | Resolution | open | ||
| Platform | OS | 5 | OS Version | ||
| Product Version | |||||
| Target Version | Fixed in Version | ||||
| Merge Request Status | |||||
| Regression date | |||||
| Regression introduced by commit | |||||
| Regression level | |||||
| Review Assigned To | |||||
| Support ticket | |||||
| OBNetwork customer | No | ||||
| Regression introduced in release | |||||
| Summary | 0020137: Migration tool methods modifying OrganizationStructureProvider class attributes | ||||
| Description | Due to issue 20129, using the public API if you get the OrganizationStructureProvider of your client and then you query (i.e.) for the children organization the object you get is a reference of the attribute of OrganizationStructureProvider (not a new instance). https://issues.openbravo.com/view.php?id=20129 [^] org.openbravo.erputil.aprmigrationtool.entity.MigrateSettlementPayments defaultFinancialAccount method: Set<String> organizations = OBContext.getOBContext().getOrganizationStructureProvider(org.getClient().getId()).getParentTree(org.getId(), true); organizations.add("0"); org.openbravo.erputil.aprmigrationtool.dao.MigrationToolDao defaultFinancialAccount method: Set<String> organizations = OBContext.getOBContext().getOrganizationStructureProvider(payment.getClient().getId()).getParentTree(payment.getOrganization().getId(), true); organizations.add("0"); | ||||
| Steps To Reproduce | 1) Check the value of the following attribute of OrganizationStructureProvider class: private Map<String, String> parentByOrganizationID = new HashMap<String, String>(); 2) Execute this code Set<String> organizations = OBContext.getOBContext().getOrganizationStructureProvider(org.getClient().getId()).getParentTree(org.getId(), true); organizations.add("0"); 3) Check again the value of: private Map<String, String> parentByOrganizationID = new HashMap<String, String>(); Realize that "0" is a new element of the Map. | ||||
| Proposed Solution | create a new instance as follows Set<String> organizations = new HashSet<String>(OBContext.getOBContext().getOrganizationStructureProvider(org.getClient().getId()).getParentTree(org.getId(), true)); organizations.add("0"); | ||||
| Additional Information | |||||
| Tags | No tags attached. | ||||
| Relationships | |||||
| Attached Files | |||||
| Issue History | |||||
| Date Modified | Username | Field | Change | ||
| 2012-03-28 13:46 | mirurita | New Issue | |||
| 2012-03-28 13:46 | mirurita | Assigned To | => mirurita | ||
| 2012-03-28 13:46 | mirurita | OBNetwork customer | => No | ||
| There are no notes attached to this issue. |