Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036163Openbravo ERPA. Platformpublic2017-06-01 13:252017-06-08 17:12
alostale 
alostale 
normalminorhave not tried
closedfixed 
5
 
3.0PR17Q3 
caristu
Core
No
0036163: val rule referring non-existent col fails if there's a property field with same name
Having a validation rule in which expression participates a column (ie. @Fin_Financial_Account_ID@) which does not exist in its tab's fields columns, but there is in that tab a property field with the same name, makes FIC requests to incorrectly throw errors about cycles.

This can be reproduced in "Add Multiple Payment P&E" window which is based on FIN_Payement table. Currency column has a validation rule that depends on Fin_Financial_Account_ID, there is no field in this tab for that column, but there is a property field that has the same name.
1. As System Admin
1.1. In Windows Tab and Fields select "Add Multiple Payments P&E" window
1.2. Select Business Partner (or any other) field and unset Read Only flag (this is done just to force FIC request on record selection, there's a validation rule that causes error to be logged for this window)
2. As Openbravo Admin
2.1. Open Financial Account window, select a record and click on "Add Multiple Payments" button
2.2. In P&E grid select any record
   -> Check in logs it complains about cycles in C_Currency val rule
No tags attached.
related to defect 0036161 closed alostale useless log having an incorrect definition for validation rule 
related to defect 00284383.0PR15Q2 closed alostale Property fields cannot be included in validations 
related to design defect 0036164 acknowledged Triage Platform Base non-existing columns can be included within validation rules 
Issue History
2017-06-01 13:25alostaleNew Issue
2017-06-01 13:25alostaleAssigned To => alostale
2017-06-01 13:25alostaleModules => Core
2017-06-01 13:25alostaleTriggers an Emergency Pack => No
2017-06-01 13:26alostaleRelationship addedrelated to 0036161
2017-06-01 13:29alostaleRelationship addedrelated to 0028438
2017-06-01 13:33alostaleRelationship addedrelated to 0036164
2017-06-01 16:39eduardo_ArgalIssue Monitored: eduardo_Argal
2017-06-01 16:49hgbotCheckin
2017-06-01 16:49hgbotNote Added: 0097081
2017-06-01 16:49hgbotStatusnew => resolved
2017-06-01 16:49hgbotResolutionopen => fixed
2017-06-01 16:49hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/2750ad10ee7d98245393053656fb86902faddd17 [^]
2017-06-01 17:17alostaleReview Assigned To => caristu
2017-06-02 18:06caristuNote Added: 0097111
2017-06-02 18:06caristuStatusresolved => closed
2017-06-02 18:06caristuFixed in Version => 3.0PR17Q3
2017-06-08 17:12hudsonbotCheckin
2017-06-08 17:12hudsonbotNote Added: 0097231

Notes
(0097081)
hgbot   
2017-06-01 16:49   
Repository: erp/devel/pi
Changeset: 2750ad10ee7d98245393053656fb86902faddd17
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Jun 01 14:24:49 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/2750ad10ee7d98245393053656fb86902faddd17 [^]

fixed bug 36163: val rule for non-existent col fails if prop fld has same name

  Having a validation rule referring to a non-existent column in tab fields, and
  having in the same tab a property field with the same name failed.

  This was caused because in the map of available columns used to parse validation
  rule, the column name was directly used withouth distinguishing property fields,
  so the validation rule was parsed assuming there was a column with the same name.

  Now this list differentiates property fields, so in this case that reference will
  just be skipped as non-existing (see also 0036164)

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
---
(0097111)
caristu   
2017-06-02 18:06   
Code reviewed + tested OK.
(0097231)
hudsonbot   
2017-06-08 17:12   
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/fda0f16ab470 [^]
Maturity status: Test