Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0037289Openbravo ERPA. Platformpublic2017-11-14 13:452018-01-03 12:39
malsasua 
inigosanchez 
normalminoralways
closedfixed 
5
 
3.0PR18Q1 
caristu
Core
Production - QA Approved
2017-04-06
3.0PR17Q3
https://code.openbravo.com/erp/devel/pi/rev/c4a5973bba10 [^]
No
0037289: It is not possible to do login using a role if the role has got a deactivated organization
when a role has got one deactivate organization, in Role > Org Access, it is not possible to do login. Error is returned:
Error occured: org.openbravo.base.exception.OBException: java.lang.IllegalArgumentException: Error when saving default values
in F&B:
. do login with user Openbravo
. go to Role:
  . record: F&B España, S.A - Employee
  . go to org access tab:
     . record: F&B España - Región Norte
       active='N'
. change the role to F&B España, S.A - Employee
Error is returned
Take into account the "is active" flag in the queries launched by RoleInfo class. Since the changeset[1] it is using a Query instead of an OBQuery to retrieve the role's organization and warehouses data.

[1] https://code.openbravo.com/erp/devel/pi/rev/c4a5973bba10 [^]
No tags attached.
related to design defect 0032869 acknowledged Triage Platform Base cannot switch to a role that's being defined in current session 
related to defect 0037278 closed inigosanchez Deactivated roles are displayed in the role dropdown of user section 
depends on backport 00372933.0PR17Q4 closed inigosanchez It is not possible to do login using a role if the role has got a deactivated organization 
depends on backport 00372943.0PR17Q3.2 closed inigosanchez It is not possible to do login using a role if the role has got a deactivated organization 
caused by feature request 0035553 closed caristu Improve scalability of the login process 
png errorWithDeactivatedOrg.png (17,110) 2017-11-14 13:52
https://issues.openbravo.com/file_download.php?file_id=11286&type=bug
png
Issue History
2017-11-14 13:45malsasuaNew Issue
2017-11-14 13:45malsasuaAssigned To => platform
2017-11-14 13:45malsasuaModules => Core
2017-11-14 13:45malsasuaTriggers an Emergency Pack => No
2017-11-14 13:52caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=16283#r16283
2017-11-14 13:52caristuFile Added: errorWithDeactivatedOrg.png
2017-11-14 13:59caristuReview Assigned To => caristu
2017-11-14 13:59caristuRelationship addedduplicate of 0032869
2017-11-14 13:59caristuNote Added: 0100516
2017-11-14 13:59caristuStatusnew => closed
2017-11-14 13:59caristuResolutionopen => duplicate
2017-11-14 14:00caristuSeveritymajor => minor
2017-11-14 14:00caristuTypedefect => design defect
2017-11-14 14:04caristuStatusclosed => new
2017-11-14 14:04caristuResolutionduplicate => open
2017-11-14 14:04caristuSeverityminor => major
2017-11-14 14:04caristuTypedesign defect => defect
2017-11-14 14:04caristuRelationship deleted0032869
2017-11-14 14:04caristuRelationship addedrelated to 0032869
2017-11-14 14:04caristuNote Deleted: 0100516
2017-11-14 14:06caristuNote Added: 0100517
2017-11-14 17:30caristuRelationship addedrelated to 0037278
2017-11-14 18:01caristuRegression level => Production - QA Approved
2017-11-14 18:01caristuRegression date => 2017-04-06
2017-11-14 18:01caristuRegression introduced in release => 3.0PR17Q3
2017-11-14 18:01caristuRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/c4a5973bba10 [^]
2017-11-14 18:17caristuProposed Solution updated
2017-11-14 18:19caristuNote Edited: 0100517bug_revision_view_page.php?bugnote_id=0100517#r16285
2017-11-14 18:20caristuRelationship addedcaused by 0035553
2017-11-14 18:22caristuStatusnew => scheduled
2017-11-14 18:22caristuAssigned Toplatform => inigosanchez
2017-11-16 12:32hgbotCheckin
2017-11-16 12:32hgbotNote Added: 0100547
2017-11-16 12:33hgbotCheckin
2017-11-16 12:33hgbotNote Added: 0100548
2017-11-16 12:33hgbotStatusscheduled => resolved
2017-11-16 12:33hgbotResolutionopen => fixed
2017-11-16 12:33hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/63b2919451b9007643c3c539c5df57ba49664e71 [^]
2017-11-16 13:27hgbotCheckin
2017-11-16 13:27hgbotNote Added: 0100551
2017-11-16 16:44caristuSeveritymajor => minor
2017-11-20 16:40hgbotCheckin
2017-11-20 16:40hgbotNote Added: 0100624
2017-11-20 16:51caristuNote Added: 0100626
2017-11-20 16:51caristuStatusresolved => closed
2017-11-20 16:51caristuFixed in Version => 3.0PR18Q1
2018-01-03 12:39hudsonbotCheckin
2018-01-03 12:39hudsonbotNote Added: 0101426
2018-01-03 12:39hudsonbotCheckin
2018-01-03 12:39hudsonbotNote Added: 0101427
2018-01-03 12:39hudsonbotCheckin
2018-01-03 12:39hudsonbotNote Added: 0101428
2018-01-03 12:39hudsonbotCheckin
2018-01-03 12:39hudsonbotNote Added: 0101441

Notes
(0100517)
caristu   
2017-11-14 14:06   
(edited on: 2017-11-14 18:19)
Note that before PR17Q3, this situation could be solved if after the role is completely defined, log out is done before using it.

Now even doing log-out before using the updated role, the problem is still reproducible because the deactivated organization remains for the role within the profile widget.

(0100547)
hgbot   
2017-11-16 12:32   
Repository: erp/devel/pi
Changeset: e7913c7e9ed0b954f35dda23bb4db88e9176ecd8
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Thu Nov 16 12:32:13 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/e7913c7e9ed0b954f35dda23bb4db88e9176ecd8 [^]

Related with issue 37289: Added tests and some improvements in test class

---
A src-test/src/org/openbravo/test/security/UserInfoSessionDataTest.java
R src-test/src/org/openbravo/test/security/RoleListForTheCurrentUser.java
---
(0100548)
hgbot   
2017-11-16 12:33   
Repository: erp/devel/pi
Changeset: 63b2919451b9007643c3c539c5df57ba49664e71
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Thu Nov 16 12:33:12 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/63b2919451b9007643c3c539c5df57ba49664e71 [^]

Fixed issue 37289: Deactivated orgs are displayed in the user profile widget

The problem was caused by the "Improve scalability of the login process" project. When improving the performance
of the query that return the complete organizations list for the current user, the OBQuery instance used to generate it was
replaced with a Query instance. The first includes by default the filter by is active.

To fix the problem this filter must be added manually in the query. Now the problem has been resolved by take into
account this filter. Besides the same problem is detected in other query related with deactivated warehouses so it is fixed too.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/navigationbarcomponents/RoleInfo.java
---
(0100551)
hgbot   
2017-11-16 13:27   
Repository: erp/devel/pi
Changeset: e270716dc0046b29c1f17461e1e99cbfa6652d08
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Thu Nov 16 13:27:38 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/e270716dc0046b29c1f17461e1e99cbfa6652d08 [^]

Related with issue 37289: Renamed the test in the suite

---
M src-test/src/org/openbravo/test/AllWebserviceTests.java
---
(0100624)
hgbot   
2017-11-20 16:40   
Repository: erp/devel/pi
Changeset: ce438d697ac449897f373271995e0cbf295a7f4c
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Mon Nov 20 16:38:44 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/ce438d697ac449897f373271995e0cbf295a7f4c [^]

Related with issue 37289: Some minor improvements in test

---
M src-test/src/org/openbravo/test/security/UserInfoSessionDataTest.java
---
(0100626)
caristu   
2017-11-20 16:51   
Code reviewed + tested OK
(0101426)
hudsonbot   
2018-01-03 12:39   
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/c81e0d3cbab5 [^]
Maturity status: Test
(0101427)
hudsonbot   
2018-01-03 12:39   
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/c81e0d3cbab5 [^]
Maturity status: Test
(0101428)
hudsonbot   
2018-01-03 12:39   
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/c81e0d3cbab5 [^]
Maturity status: Test
(0101441)
hudsonbot   
2018-01-03 12:39   
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/c81e0d3cbab5 [^]
Maturity status: Test