Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0032375 | Openbravo ERP | A. Platform | public | 2016-02-29 14:12 | 2016-03-17 10:56 |
|
Reporter | ngarcia | |
Assigned To | alostale | |
Priority | high | Severity | minor | Reproducibility | random |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR16Q2 | |
Merge Request Status | |
Review Assigned To | caristu |
OBNetwork customer | OBPS |
Web browser | |
Modules | Core |
Support ticket | 40871 |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0032375: preferences incorrectly resolve client visibility |
Description | Having the same preference with two records defined as:
1. visible at System client
2. visible at specific client
Behavior when retrieving the value for this property is undefined:
1. Sometimes it can correctly return client specific value, which is the expected behavior
2. Some other times a PropertyConflictException is thrown
|
Steps To Reproduce | 1. Go to Preferences window
2. Create a preference with system client visibility
3. Create the same preference with different value and visibility for concrete client
4. Try to retrieve that preference's value for that concrete client:
-> sometimes PropertyConflictException will be thrown, whereas some others specific client value will be obtained |
Proposed Solution | 1. Make property resolution predictable so, in case of conflict, it always works in the same manner.
2. Implement proper handling of client visibility resolution. Preferences.isHigherPriority method needs to be revisited for client level resolution, this is current code which is incorrect:
if ((pref2.getVisibleAtClient() == null || pref2.getVisibleAtClient().getId().equals("0"))
&& pref1.getVisibleAtClient() != null && !pref1.getVisibleAtClient().getId().equals("0")) {
return 1;
} |
Additional Information | |
Tags | No tags attached. |
Relationships | has duplicate | defect | 0033156 | | closed | platform | Preferences.getPreferenceValue triggers not needed ad_client (+ probably ad_org loads) |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2016-02-29 14:12 | ngarcia | New Issue | |
2016-02-29 14:12 | ngarcia | Assigned To | => platform |
2016-02-29 14:12 | ngarcia | OBNetwork customer | => Yes |
2016-02-29 14:12 | ngarcia | Modules | => Core |
2016-02-29 14:12 | ngarcia | Support ticket | => 40871 |
2016-02-29 14:12 | ngarcia | Triggers an Emergency Pack | => No |
2016-02-29 14:12 | ngarcia | Issue Monitored: networkb | |
2016-02-29 14:17 | ngarcia | Summary | isHigerPriority function of Preferences class returns 0 when pref2 is defined as client level and pref1 as system level => isHigherPriority function of Preferences class returns 0 when pref2 is defined as client level and pref1 as system level |
2016-02-29 14:17 | ngarcia | Description Updated | bug_revision_view_page.php?rev_id=11273#r11273 |
2016-03-04 08:32 | alostale | Reproducibility | sometimes => random |
2016-03-04 08:32 | alostale | Summary | isHigherPriority function of Preferences class returns 0 when pref2 is defined as client level and pref1 as system level => preferences incorrectly resolve client visibility |
2016-03-04 08:32 | alostale | Description Updated | bug_revision_view_page.php?rev_id=11344#r11344 |
2016-03-04 08:32 | alostale | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=11346#r11346 |
2016-03-04 08:32 | alostale | Proposed Solution updated | |
2016-03-04 09:06 | alostale | Assigned To | platform => alostale |
2016-03-04 09:06 | alostale | Review Assigned To | => caristu |
2016-03-04 09:08 | hgbot | Checkin | |
2016-03-04 09:08 | hgbot | Note Added: 0084707 | |
2016-03-04 09:08 | hgbot | Checkin | |
2016-03-04 09:08 | hgbot | Note Added: 0084708 | |
2016-03-04 09:08 | hgbot | Checkin | |
2016-03-04 09:08 | hgbot | Note Added: 0084709 | |
2016-03-04 09:08 | hgbot | Status | new => resolved |
2016-03-04 09:08 | hgbot | Resolution | open => fixed |
2016-03-04 09:08 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/94f9263bb271e8f1a9ec9959ed26449c1b3dc02b [^] |
2016-03-04 09:09 | hgbot | Checkin | |
2016-03-04 09:09 | hgbot | Note Added: 0084710 | |
2016-03-07 09:58 | caristu | Note Added: 0084754 | |
2016-03-07 09:58 | caristu | Status | resolved => closed |
2016-03-07 09:58 | caristu | Fixed in Version | => 3.0PR16Q2 |
2016-03-07 09:59 | caristu | Note Edited: 0084754 | bug_revision_view_page.php?bugnote_id=0084754#r11373 |
2016-03-17 10:56 | hudsonbot | Checkin | |
2016-03-17 10:56 | hudsonbot | Note Added: 0085180 | |
2016-03-17 10:56 | hudsonbot | Checkin | |
2016-03-17 10:56 | hudsonbot | Note Added: 0085181 | |
2016-03-17 10:56 | hudsonbot | Checkin | |
2016-03-17 10:56 | hudsonbot | Note Added: 0085182 | |
2016-03-17 10:56 | hudsonbot | Checkin | |
2016-03-17 10:56 | hudsonbot | Note Added: 0085183 | |
2016-06-06 14:17 | shuehner | Relationship added | has duplicate 0033156 |
Notes |
|
(0084707)
|
hgbot
|
2016-03-04 09:08
|
|
Repository: erp/devel/pi
Changeset: 6a656a96298bee7337800296a14d8c9d869afbdb
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Mar 04 08:45:40 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/6a656a96298bee7337800296a14d8c9d869afbdb [^]
related to bug 32375: preferences incorrectly resolve client visibility
Small code clean up:
-isHigherPriority renamed to getHighestPriority: by convention is* are boolean
getters which was not the case of this one
-removed unneded brackets in condition which didn't help to make the code more
readable
---
M src/org/openbravo/erpCommon/businessUtility/Preferences.java
---
|
|
|
(0084708)
|
hgbot
|
2016-03-04 09:08
|
|
Repository: erp/devel/pi
Changeset: bc3e4c65d7b1bb7a9ecd5185fbf412b5ac6518a6
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Mar 04 08:48:31 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/bc3e4c65d7b1bb7a9ecd5185fbf412b5ac6518a6 [^]
related to bug 32375: make preference resolution more consistent
In case of several preferences defined for a given property/attribute, the
result of getting value could be undetermistic.
Solved by sorting by preference's id in these cases.
---
M src/org/openbravo/erpCommon/businessUtility/Preferences.java
---
|
|
|
(0084709)
|
hgbot
|
2016-03-04 09:08
|
|
Repository: erp/devel/pi
Changeset: 94f9263bb271e8f1a9ec9959ed26449c1b3dc02b
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Mar 04 08:50:01 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/94f9263bb271e8f1a9ec9959ed26449c1b3dc02b [^]
fixed bug 32375: preferences incorrectly resolve client visibility
Reimplemented client visibility resolution to correctly handle the case of
2 preference candidates with different client visibility.
---
M src/org/openbravo/erpCommon/businessUtility/Preferences.java
---
|
|
|
(0084710)
|
hgbot
|
2016-03-04 09:09
|
|
|
|
(0084754)
|
caristu
|
2016-03-07 09:58
(edited on: 2016-03-07 09:59) |
|
Code review + tested OK
Tested creating two preferences, both with different value and one with visibility for the system client and the other one for the specific client. Now it is always returned the client specific value, when we are logged in that client.
|
|
|
|
|
|
|
|
|
|
|
|
|
|