Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0054337Openbravo ERPA. Platformpublic2024-01-12 15:132024-01-18 17:34
caristu 
ablasco 
urgentminorhave not tried
closedfixed 
5
 
PR24Q2 
Core
2023-10-17
https://gitlab.com/openbravo/product/openbravo/-/commit/276992c1ff21c2babfa16573c66be987965afdd2 [^]
No
0054337: Some computed column fields are displayed as editable for automatic roles
Fields backed by computed columns and not explicitly marked as read only are displayed as editable for automatic roles. By definition, this kind of fields must always be displayed as read only.

Note: this issue can be easily workarounded by explicitly marking the field as read only
1) Create a computed column[1]. Leave the column definition as updateable.
2) Create a field for the new computed column. Do not explicitly mark it as read only, it should not be necessary
3) Access to the window with the new field, with an automatic role. Note that the computed column is displayed as non read only.


[1] http://wiki.openbravo.com/wiki/How_to_create_a_Computed_Column [^]
The source of the problem is here[1]. Now that code is causing the getFieldLevelRoles method to be executed always when accessing to a window with an automatic role. This did not happen before. It must be checked if this is correct or not.

If the previous is correct, one possible solution could be just to add here[2] this check: field.getColumn().getSqllogic() == null


[1] https://gitlab.com/openbravo/product/openbravo/-/blob/master/modules/org.openbravo.client.application/src/org/openbravo/client/application/WindowSettingsActionHandler.java#L172 [^]
[2] https://gitlab.com/openbravo/product/openbravo/-/blob/master/modules/org.openbravo.client.application/src/org/openbravo/client/application/WindowSettingsActionHandler.java#L209 [^]
No tags attached.
depends on backport 0054354PR24Q1 closed Triage Platform Base Some computed column fields are displayed as editable for automatic roles 
caused by defect 0053408 closed ablasco Do not persist access for automatic roles 
Issue History
2024-01-12 15:13caristuNew Issue
2024-01-12 15:13caristuAssigned To => Triage Platform Base
2024-01-12 15:13caristuModules => Core
2024-01-12 15:13caristuTriggers an Emergency Pack => No
2024-01-12 15:19caristuProposed Solution updated
2024-01-12 15:20caristuRelationship addedcaused by 0053408
2024-01-12 15:23caristuRegression date => 2023-10-17
2024-01-12 15:23caristuRegression introduced by commit => https://gitlab.com/openbravo/product/openbravo/-/commit/276992c1ff21c2babfa16573c66be987965afdd2 [^]
2024-01-12 15:24caristuDescription Updatedbug_revision_view_page.php?rev_id=27339#r27339
2024-01-12 15:34caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=27341#r27341
2024-01-16 08:47hgbotNote Added: 0159345
2024-01-16 10:00cbernerStatusnew => scheduled
2024-01-16 10:00cbernerAssigned ToTriage Platform Base => ablasco
2024-01-18 17:34hgbotResolutionopen => fixed
2024-01-18 17:34hgbotStatusscheduled => closed
2024-01-18 17:34hgbotFixed in Version => PR24Q2
2024-01-18 17:34hgbotNote Added: 0159490
2024-01-18 17:34hgbotNote Added: 0159491

Notes
(0159345)
hgbot   
2024-01-16 08:47   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/1104 [^]
(0159490)
hgbot   
2024-01-18 17:34   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: f0d7953bcdea40fc73c91d3cfba5d8534e28381d
Author: Adrián Blasco <adrian.blasco@openbravo.com>
Date: 18-01-2024 16:34:13
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/f0d7953bcdea40fc73c91d3cfba5d8534e28381d [^]

Fixes ISSUE-54337: Computed Column Fields are displayed as Editable for Auto Roles

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/WindowSettingsActionHandler.java
---
(0159491)
hgbot   
2024-01-18 17:34   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/1104 [^]