Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0038030Openbravo ERPA. Platformpublic2018-03-02 11:132018-03-09 10:11
caristu 
caristu 
immediatemajorhave not tried
closedfixed 
5
 
3.0PR18Q2 
alostale
Core
Automated tests
2018-02-23
pi
https://code.openbravo.com/erp/devel/pi/rev/4a1f3df29564b6dd12259981f941d0d5d74bebab [^]
No
0038030: Accessible warehouses by a role are not calculated properly depending on the order which the accessible orgs are retrieved
Accessible warehouses by a role are not calculated properly depending on the order which the accessible organizations are retrieved.

Besides, this is causing (sometimes, depending on the mentioned order) the failure of the int-gui-oracle job in CI: http://ci.openbravo.com/job/int-gui-oracle/2602/ [^]
1) Apply the attached path (roleInfoForceOrgSort.diff)
2) Compile and restart tomcat
3) Login with Openbravo user
4) In the Profile widget, select the QA Testing Admin role. Notice that just the "USA Warehouse" can be selected --> It should be possible to select also both the "Spain East Warehouse" and "Spain Warehouse"
No tags attached.
duplicate of defect 0038026 closed platform Only some warehouses are shown using "*" Organization. Not all the records are shown 
caused by feature request 0037980 closed alostale Improve organization cache in session 
diff roleInfoForceOrgSort.diff (1,178) 2018-03-02 11:13
https://issues.openbravo.com/file_download.php?file_id=11608&type=bug
Issue History
2018-03-02 11:13caristuNew Issue
2018-03-02 11:13caristuAssigned To => platform
2018-03-02 11:13caristuFile Added: roleInfoForceOrgSort.diff
2018-03-02 11:13caristuModules => Core
2018-03-02 11:13caristuTriggers an Emergency Pack => No
2018-03-02 11:22caristuRelationship addedcaused by 0037980
2018-03-02 11:23caristuRegression level => Automated tests
2018-03-02 11:23caristuRegression date => 2018-02-23
2018-03-02 11:23caristuRegression introduced in release => pi
2018-03-02 11:23caristuRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/4a1f3df29564b6dd12259981f941d0d5d74bebab [^]
2018-03-02 11:23caristuAssigned Toplatform => caristu
2018-03-02 12:09caristuRelationship addedduplicate of 0038026
2018-03-02 12:27caristuSeverityminor => major
2018-03-02 13:17caristuStatusnew => scheduled
2018-03-02 13:19caristuNote Added: 0102919
2018-03-02 13:19caristuStatusscheduled => resolved
2018-03-02 13:19caristuFixed in SCM revision => fca95a6558d2
2018-03-02 13:19caristuResolutionopen => fixed
2018-03-02 13:19caristuNote Edited: 0102919bug_revision_view_page.php?bugnote_id=0102919#r16793
2018-03-02 13:20caristuNote Edited: 0102919bug_revision_view_page.php?bugnote_id=0102919#r16794
2018-03-02 13:24caristuFixed in SCM revisionfca95a6558d2 => https://code.openbravo.com/erp/devel/pi/rev/fca95a6558d2 [^]
2018-03-02 15:30hgbotCheckin
2018-03-02 15:30hgbotNote Added: 0102940
2018-03-02 18:07caristuReview Assigned To => alostale
2018-03-05 16:55hudsonbotCheckin
2018-03-05 16:55hudsonbotNote Added: 0102983
2018-03-09 10:11alostaleNote Added: 0103115
2018-03-09 10:11alostaleStatusresolved => closed
2018-03-09 10:11alostaleFixed in Version => 3.0PR18Q2

Notes
(0102919)
caristu   
2018-03-02 13:19   
(edited on: 2018-03-02 13:20)
Repository: erp/devel/pi
Changeset: 1b9efd28dc913c45d3f5ae84a201e4c7a1e06134
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Fri, 02 Mar 2018 13:12:05 +0100
URL: https://code.openbravo.com/erp/devel/pi/rev/fca95a6558d2 [^]

fixes issues 38030: wrong calculation of accessible warehouses per organization

As part of the improvements done in[1], when calculating the available warehouses per accessible organization, the natural tree calculation was tried to be reused when possible instead of calculating it for every organization.

This caused that it could be possible to do a wrong warehouse assignment per organization, depending on the order which the organizations were being processed.

To avoid this problem, that improvement has been reverted, and the natural tree is being recalculated again for every organization.

Together with this, a micro optimization has been added by iterating the entry set instead of the key set of the "organizationWarehouses" map. This is because when both the key and the value of the map are needed, it's more efficient to iterate the entry set.

[1] https://code.openbravo.com/erp/devel/pi/rev/4a1f3df29564b6dd12259981f941d0d5d74bebab#l1.29 [^]

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/navigationbarcomponents/RoleInfo.java
---

(0102940)
hgbot   
2018-03-02 15:30   
Repository: erp/devel/pi
Changeset: 244151b9965fe4416957b95533faa3c7d9b38d21
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Fri Mar 02 15:30:02 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/244151b9965fe4416957b95533faa3c7d9b38d21 [^]

related to issue 38030: added test case

---
M src-test/src/org/openbravo/test/security/UserInfoSessionDataTest.java
---
(0102983)
hudsonbot   
2018-03-05 16:55   
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/67b9804050d3 [^]
Maturity status: Test
(0103115)
alostale   
2018-03-09 10:11   
reviewed + tested