Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0023124Openbravo ERPA. Platformpublic2013-02-20 11:102013-04-16 19:18
mirurita 
shankarb 
normalminoralways
closedfixed 
20Community Appliance
pi 
3.0MP23 
AugustoMauch
Core
No
0023124: Tabledir reference not resolving properly column identifier in some cases
Tabledir reference not resolving properly column identifier in some cases
1) Put core in development
alter table c_invoice add column mytestcolumn character varying(32);
alter table c_invoice add CONSTRAINT mytestcolumnconstraint FOREIGN KEY (mytestcolumn) REFERENCES c_bpartner (c_bpartner_id);

2) Create a new 'OBUISEL_Selector Reference' for c_bpartner table
  
3) Create a new column for 'mytestcolumn' in c_invoice table
  * Used as Record Identifier
  * Link to parent column
  * Reference: OBUISEL_Selector Reference of step 2)

4) Change C_InvoiceLine.C_Invoice_ID column reference to tabledir
5) Compile
6) Go to sales invoice window
7) Create a new header
8) Create a new line

FROM C_Invoice td0
left join C_BPartner td1 on td0.Mytestcolumn = td1.Mytestcolumn
AND td1.AD_Client_ID IN ('0','23C59575B9CF467C9620760EB255B389')
AND td1.AD_Org_ID IN ('E443A31992CB4635AFCAEABE7183CE85','B843C30461EA4501935CB1D125C9C25A','19404EAD144C49A0AF37D54377CF452D','0')
WHERE td0.AD_Client_ID IN ('0','23C59575B9CF467C9620760EB255B389')
AND td0.AD_Org_ID IN ('E443A31992CB4635AFCAEABE7183CE85','B843C30461EA4501935CB1D125C9C25A','19404EAD144C49A0AF37D54377CF452D','0')
AND (td0.isActive = 'Y' OR td0.C_Invoice_ID = (?) )
ORDER BY 2, 2Exception:org.postgresql.util.PSQLException: ERROR: column td1.mytestcolumn does not exist
  Position: 387
No tags attached.
diff testIssue23124.diff (14,966) 2013-04-11 16:41
https://issues.openbravo.com/file_download.php?file_id=6092&type=bug
Issue History
2013-02-20 11:10miruritaNew Issue
2013-02-20 11:10miruritaAssigned To => AugustoMauch
2013-02-20 11:10miruritaModules => Core
2013-02-20 11:10miruritaTriggers an Emergency Pack => No
2013-03-21 12:51AugustoMauchAssigned ToAugustoMauch => shankarb
2013-03-25 07:06shankarbStatusnew => scheduled
2013-03-25 07:06shankarbfix_in_branch => pi
2013-03-25 07:06shankarbReview Assigned To => AugustoMauch
2013-03-25 07:06shankarbfix_in_branchpi =>
2013-03-25 07:06shankarbIssue Monitored: AugustoMauch
2013-03-25 07:07shankarbNote Added: 0057395
2013-03-25 07:07shankarbStatusscheduled => resolved
2013-03-25 07:07shankarbFixed in SCM revision => https://code.openbravo.com/erp/devel/pi/rev/096f0a4c98fd [^]
2013-03-25 07:07shankarbResolutionopen => fixed
2013-03-25 10:30shankarbNote Added: 0057400
2013-03-25 13:12hudsonbotCheckin
2013-03-25 13:12hudsonbotNote Added: 0057415
2013-03-26 18:31hgbotCheckin
2013-03-26 18:31hgbotNote Added: 0057476
2013-03-26 18:34AugustoMauchNote Added: 0057477
2013-03-26 18:34AugustoMauchStatusresolved => new
2013-03-26 18:34AugustoMauchResolutionfixed => open
2013-03-28 01:39hudsonbotCheckin
2013-03-28 01:39hudsonbotNote Added: 0057525
2013-04-08 10:55AugustoMauchStatusnew => scheduled
2013-04-08 10:55AugustoMauchfix_in_branch => pi
2013-04-10 04:06hgbotCheckin
2013-04-10 04:06hgbotNote Added: 0057815
2013-04-10 04:06hgbotStatusscheduled => resolved
2013-04-10 04:06hgbotResolutionopen => fixed
2013-04-10 04:06hgbotFixed in SCM revisionhttps://code.openbravo.com/erp/devel/pi/rev/096f0a4c98fd [^] => http://code.openbravo.com/erp/devel/pi/rev/84a2a4d680e136f831073ff42e8f9848cb0394c3 [^]
2013-04-11 16:41AugustoMauchNote Added: 0057846
2013-04-11 16:41AugustoMauchStatusresolved => new
2013-04-11 16:41AugustoMauchResolutionfixed => open
2013-04-11 16:41AugustoMauchFile Added: testIssue23124.diff
2013-04-11 16:42AugustoMauchStatusnew => scheduled
2013-04-11 16:42AugustoMauchStatusscheduled => resolved
2013-04-11 16:42AugustoMauchResolutionopen => fixed
2013-04-11 16:43AugustoMauchNote Added: 0057847
2013-04-11 16:43AugustoMauchStatusresolved => closed
2013-04-11 16:43AugustoMauchFixed in Version => 3.0MP23
2013-04-16 19:18hudsonbotCheckin
2013-04-16 19:18hudsonbotNote Added: 0057948

Notes
(0057395)
shankarb   
2013-03-25 07:07   
Fixes Issue 23124, Related to Issue 23267 : Selectors as Identifiers

When comparing selector columns in ComboData the column name in the table was used to compare with the selector table. This results in exception when the column names are different.
In case the selector has the column field, that column is used for comparison avoiding this error.
(0057400)
shankarb   
2013-03-25 10:30   
Fixed in pi changeset https://code.openbravo.com/erp/devel/pi/rev/096f0a4c98fd [^]
(0057415)
hudsonbot   
2013-03-25 13: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/88ae0db922b5 [^]

Maturity status: Test
(0057476)
hgbot   
2013-03-26 18:31   
Repository: erp/devel/pi
Changeset: fd931cc7208746c5b58800607029bcf68a8ef146
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Mar 26 18:01:18 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/fd931cc7208746c5b58800607029bcf68a8ef146 [^]

Related to issue 23124: Fix is backed out until beginning of next MP cycle

---
M modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/reference/SelectorUIReference.java
---
(0057477)
AugustoMauch   
2013-03-26 18:34   
Fix has been backed out:
- It is risky and the end of the current MP cycle is close
- It is difficult to test
(0057525)
hudsonbot   
2013-03-28 01:39   
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/6c4c5ed08030 [^]

Maturity status: Test
(0057815)
hgbot   
2013-04-10 04:06   
Repository: erp/devel/pi
Changeset: 84a2a4d680e136f831073ff42e8f9848cb0394c3
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Wed Apr 10 07:32:00 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/84a2a4d680e136f831073ff42e8f9848cb0394c3 [^]

Fixes Issue 23124, Related to Issue 23267 : Selectors as Identifiers

When comparing selector columns in ComboData the column name in the table was used to compare with the selector table. This results in exception when the column names are different.
In case the selector has the column field, that column is used for comparison avoiding this error.

---
M modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/reference/SelectorUIReference.java
---
(0057846)
AugustoMauch   
2013-04-11 16:41   
Reopened just to attach diff to test the issue
(0057847)
AugustoMauch   
2013-04-11 16:43   
Code reviewed and verified in pi@57cbb59b1aca.

To test the issue, that attached patch has been used, which sets up the components described in the steps to reproduce.
(0057948)
hudsonbot   
2013-04-16 19:18   
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/8df08bea850d [^]

Maturity status: Test