Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0013650Openbravo ERP00. Application dictionarypublic2010-06-14 16:432010-06-18 00:00
networkb 
iperdomo 
immediatemajoralways
closedfixed 
5
2.50MP18 
2.50MP19 
Core
No
0013650: The preferences are not loaded when accessing the application.
The preferences are not loaded when accessing the application.
You have to click on the change role popup and click ok, to load
the preferences defined on the preferences window.
-Define the login a default with:
Role=OpenbravoAdmin
Entity=SmallBazar
Organization=Main


-Define a new preference as following:

Property List = N
attribute=Description
value= hello
visible at client=small bazar
visible at user= openbravo
window= sales invoice
visible at organization= Main
visible at role= Openbravo Admin

-Logout
-Login (you will access with the data defined previously as default)
-Go to sales invoice window
-Click on new
*See that the Description field is not filled

-Click on the role popup to change the role. Without change click ok.
-Go to sales invoice windows and click ok.
*Now it works well.
Regression
related to design defect 0013683 acknowledged Triage Platform Base Review/Fix LoginUtils.fillSessionArguments function 
Issue History
2010-06-14 16:43networkbNew Issue
2010-06-14 16:43networkbAssigned To => alostale
2010-06-15 17:14roklenardicIssue Monitored: roklenardic
2010-06-15 17:29networkbTarget Version2.50MP20 => 2.50MP19
2010-06-15 17:29networkbSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=508#r508
2010-06-15 17:32iperdomoStatusnew => scheduled
2010-06-15 17:32iperdomoAssigned Toalostale => iperdomo
2010-06-15 17:32iperdomofix_in_branch => pi
2010-06-15 17:51hgbotCheckin
2010-06-15 17:51hgbotNote Added: 0028456
2010-06-15 17:51hgbotStatusscheduled => resolved
2010-06-15 17:51hgbotResolutionopen => fixed
2010-06-15 17:51hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/75caeec688df4b4054461d9f52802c85532151ef [^]
2010-06-16 00:20hudsonbotCheckin
2010-06-16 00:20hudsonbotNote Added: 0028480
2010-06-16 10:04psarobeTag Attached: Regression
2010-06-17 12:27hgbotCheckin
2010-06-17 12:27hgbotNote Added: 0028548
2010-06-17 12:27hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/75caeec688df4b4054461d9f52802c85532151ef [^] => http://code.openbravo.com/erp/devel/pi/rev/8783462f36f6ff8a4c2502b875a35fd1344f873e [^]
2010-06-17 12:31hgbotCheckin
2010-06-17 12:31hgbotNote Added: 0028549
2010-06-17 12:31hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/8783462f36f6ff8a4c2502b875a35fd1344f873e [^] => http://code.openbravo.com/erp/devel/pi/rev/8f2736db83609740a6cf85424545e8561109aa94 [^]
2010-06-17 13:17iperdomoRelationship addedrelated to 0013683
2010-06-17 13:31shuehnerNote Added: 0028555
2010-06-17 13:31shuehnerStatusresolved => closed
2010-06-17 20:43hudsonbotCheckin
2010-06-17 20:43hudsonbotNote Added: 0028574
2010-06-17 20:43hudsonbotCheckin
2010-06-17 20:43hudsonbotNote Added: 0028575
2010-06-18 00:00anonymoussf_bug_id0 => 3017789

Notes
(0028456)
hgbot   
2010-06-15 17:51   
Repository: erp/devel/pi
Changeset: 75caeec688df4b4054461d9f52802c85532151ef
Author: Iván Perdomo <ivan.perdomo <at> openbravo.com>
Date: Tue Jun 15 17:49:18 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/75caeec688df4b4054461d9f52802c85532151ef [^]

Fixes issue 13650: Initialized the OBContext before using it
The Preferences.getAllPreferences() call is using DAL and base some
filtering on the OBContext. Since in the login process the context
is not yet available, is initialized/created in fillSessionArguments.
The OBContext was created with the user credentials _after_ using it, in
getAllPreferences, therefore some preferences were filtered out.
When changing role the 'old' OBContext was used, and this is also wrong.

---
M src/org/openbravo/base/secureApp/LoginUtils.java
---
(0028480)
hudsonbot   
2010-06-16 00:20   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/75caeec688df [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/3b320eca6d68 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17616.obx [^]
(0028548)
hgbot   
2010-06-17 12:27   
Repository: erp/devel/pi
Changeset: 8783462f36f6ff8a4c2502b875a35fd1344f873e
Author: Iván Perdomo <ivan.perdomo <at> openbravo.com>
Date: Thu Jun 17 12:25:37 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/8783462f36f6ff8a4c2502b875a35fd1344f873e [^]

Fixes issue 13650: Added mechanism to rollback OBContext on failure
The OBContext initialization was move to be one of the first thing to do,
if one of the SQLC calls fails, the OBContext remains changed.
This change, caches the current OBContext and rollbacks it when an exception
occours.

---
M src/org/openbravo/base/secureApp/LoginUtils.java
---
(0028549)
hgbot   
2010-06-17 12:31   
Repository: erp/devel/pi
Changeset: 8f2736db83609740a6cf85424545e8561109aa94
Author: Iván Perdomo <ivan.perdomo <at> openbravo.com>
Date: Thu Jun 17 12:31:10 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/8f2736db83609740a6cf85424545e8561109aa94 [^]

Fixes issue 13650: Added rollback OBContext on each possible fail

---
M src/org/openbravo/base/secureApp/LoginUtils.java
---
(0028555)
shuehner   
2010-06-17 13:31   
Reviewed and tested.
Needed fix was to change the obcontext to the target context (or the role-switch or login) before using dal for any action.
Change did move the changing of the context above all users using dal (i.e. getAllPreferences) fixing the reported issue.
As Safety for errors happening after the obcontext change, the old context is saved and restored on those error as a rollback mechanism. A related issue is created to audit and fx (if needed) the other cases of missing rollback in the same method.
(0028574)
hudsonbot   
2010-06-17 20:43   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/8783462f36f6 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/6585f66712fd [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17682.obx [^]
(0028575)
hudsonbot   
2010-06-17 20:43   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/8f2736db8360 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/6585f66712fd [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17682.obx [^]