#448 inconsistent behavior for isEncrypted flag



I just found a bug which is in effect a mix of wrong definitions and inconsistent behavior between the swing and zk gui.
Some fields into the dictionary have been wrongly defined with the isEncrypted flag set to Yes:

Field Name ColumnName Tab Name Window Name
Account Date DateAcct Material Receipt Material Receipt
Account Date DateAcct Return to Vendor Return to Vendor
Account Date DateAcct Customer Return Customer Return
Account Date DateAcct Shipment Shipment (Customer)
Client AD_Client_ID Translation Element
Organization AD_Org_ID Workflow Translation System Translation Check
Organization AD_Org_ID Exclude Lot Control
Organization AD_Org_ID Employee Business Partner
Organization AD_Org_ID Click Click
Sales Representative SalesRep_ID Project Project
Sales Representative SalesRep_ID Project Project (Lines/Issues)
Warehouse M_Warehouse_ID EDI Definition EDI Definition

Now the Swing GUI show this fields in clear, both in single row view and grid mode, because it tests isEncrypted only for fields of text type (like String, Text, TextLong ecc.) so basically it ignore it for every other type.

On ZK instead single row view shows the fields in clear, whereas in grid mode is shows asterisks. This is because the very first test into various methods:

org.adempiere.webui.component.GridTabListItemRenderer.getDisplayText(Object, int)
org.adempiere.webui.component.GridTabRowRenderer.getDisplayText(Object, GridField)

is something like:

if (gridField.isEncryptedField())
return "********";

You can easily test it on http://asds2.adempiere.de:8080/webui/ into the Shipment (customer) window in grid mode looking at the Account Date field

I think we should first reset the isEncrypted flag to 'N' for these fields because it's clearly a mistake and then possibly standardize the behavior in both Swing and ZK GUI.

Best regards
Angelo Dabalà

PS. this is the sql statement I used to fix the fields

update ad_field set isencrypted = 'N', updated = TO_TIMESTAMP('2011-09-29 10:00:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100
where ad_field_id in (1404,2486,2935,3493,3545,4445,6977,7591,7668,12210,57719,57853);


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks