Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0018834Openbravo ERPA. Platformpublic2011-10-21 15:092022-02-01 08:08
gorkaion 
Triage Platform Base 
normalmajoralways
acknowledgedopen 
20Gentoo
pi 
 
Core
No
0018834: Columns used on validation rules of process parameters are not correctly calculated
It is not possible to use a validation rule that uses more than one column to filter the drop down in a process' parameter.

Consider a process called from a window that has a parameter filtered using a validation rule. If this validation rule uses more than one column to filter only the first one is used.
1. Go to the 'Payment In' window and remove the filter to get one that it is processed. Click on the 'Reactivate' button and check that 'Reactivate' and 'Void' actions are available.

2. Change to System Admin role and go to the ''Process Payment valid actions'' validation setup that it is used to filter the available actions to process a payment.

Change the code from:

((@EM_APRM_Process_Payment@ = 'P' AND AD_Ref_List.value='P') OR (@EM_APRM_Process_Payment@ = 'R' AND AD_Ref_List.value IN ('R', 'V')) OR (@EM_APRM_Process_Payment@ is null))

to:

(@isActive@ = @isActive@ AND (@EM_APRM_Process_Payment@ = 'P' AND AD_Ref_List.value='P') OR (@EM_APRM_Process_Payment@ = 'R' AND AD_Ref_List.value IN ('R', 'V')) OR (@EM_APRM_Process_Payment@ is null))

3. Compile the window using 'ant compile -Dtab="Payment In"'

4. Refresh tomcat and go again to the same payment and click the 'Reactivate' button. Check that the available actions have been changed although the validation should return the same values.

5. Check that the org.openbravo.erpWindows.PaymentIn.Header class is only setting the isActive value and not setting the 'EM_APRM_Process_Payment' field's value.
The issue is on the getComboParaCode() method of WadActionButton class.

The selectComboParams() query is parsing the code of the validation rule and getting the first value it finds between "@".
No tags attached.
related to feature request 0018835 new Triage Platform Base Validation rules on process' parameters can only use real columns 
Issue History
2011-10-21 15:09gorkaionNew Issue
2011-10-21 15:09gorkaionAssigned To => alostale
2011-10-21 15:09gorkaionModules => Core
2011-10-21 15:15gorkaionRelationship addedrelated to 0018835
2012-03-02 09:31alostaleNote Added: 0045688
2012-03-02 09:31alostaleTypedefect => design defect
2012-09-24 21:06AugustoMauchNote Added: 0052419
2012-09-24 21:06AugustoMauchStatusnew => scheduled
2017-03-31 14:36alostaleStatusscheduled => acknowledged
2017-04-10 14:33alostaleAssigned Toalostale => platform
2022-02-01 08:08alostaleAssigned Toplatform => Triage Platform Base

Notes
(0045688)
alostale   
2012-03-02 09:31   
Moving to design defect:
-Fixing this bug requires quite a big refactoring in WAD processes generation.
-These kind of processes should be replaced in mid-term by process param windows.
(0052419)
AugustoMauch   
2012-09-24 21:06   
Effort: 5
Impact: mid
Plan: mid