Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0023922Openbravo ERPA. Platformpublic2013-05-27 17:162013-05-28 23:57
mirurita 
shankarb 
highmajoralways
closedfixed 
20Community Appliance
pi 
3.0MP24 
AugustoMauch
Core
Production - QA Approved
2013-03-11
https://code.openbravo.com/erp/devel/pi/rev/797f69e6a899c12da183a16692453fc0bd1f7d7e [^]
No
0023922: Tab tree it is not working under some circumstances
When parsing the tab where clause all the ocurrences of 'e.' pattern are removed.
This is because the alias is removed (if exists).

But it is failing for example in the following example

[e.]projectCategory = 'OBCNTR_CONTRACT' AND [e.]oBCNTRContractTyp[e.]salesContract = true

the second 'e.' is removed by mistake.
1) Create a tab (having a tree) with a where clause that firts the following condition
e.projectCategory = 'OBCNTR_CONTRACT' AND e.oBCNTRContractType.salesContract = true

it must have a property with the 'e' as last character followed by a dot:
in this case oBCNTRContractTyp[e.]salesContract

2) Go to this tab and click on tree icon

the code is doing this
hqlWhereClause = hqlWhereClause.replace("e.", "");

the result is
projectCategory = 'OBCNTR_CONTRACT' AND oBCNTRContractTypsalesContract = true

it replaces by mistake an incorrect 'e.' pattern

the sql fails and the tab tree is not displayed
No tags attached.
png Screenshot from 2013-05-27 17:12:02.png (15,419) 2013-05-27 17:16
https://issues.openbravo.com/file_download.php?file_id=6161&type=bug
png
Issue History
2013-05-27 17:16miruritaNew Issue
2013-05-27 17:16miruritaAssigned To => AugustoMauch
2013-05-27 17:16miruritaFile Added: Screenshot from 2013-05-27 17:12:02.png
2013-05-27 17:16miruritaModules => Core
2013-05-27 17:16miruritaTriggers an Emergency Pack => No
2013-05-27 17:17miruritaRegression level => Production - QA Approved
2013-05-27 17:17miruritaRegression date => 2013-03-11
2013-05-27 17:17miruritaRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/b69625663ccc [^]
2013-05-27 17:22AugustoMauchAssigned ToAugustoMauch => shankarb
2013-05-28 06:29shankarbReview Assigned To => AugustoMauch
2013-05-28 06:29shankarbStatusnew => scheduled
2013-05-28 06:29shankarbfix_in_branch => pi
2013-05-28 06:29shankarbIssue Monitored: AugustoMauch
2013-05-28 06:38hgbotCheckin
2013-05-28 06:38hgbotNote Added: 0058978
2013-05-28 06:38hgbotStatusscheduled => resolved
2013-05-28 06:38hgbotResolutionopen => fixed
2013-05-28 06:38hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/51de13657be6bc85ec907f7afce90c6fdeb15861 [^]
2013-05-28 09:49AugustoMauchNote Added: 0058983
2013-05-28 09:49AugustoMauchStatusresolved => new
2013-05-28 09:49AugustoMauchResolutionfixed => open
2013-05-28 10:45hgbotCheckin
2013-05-28 10:45hgbotNote Added: 0058984
2013-05-28 12:45shankarbStatusnew => scheduled
2013-05-28 12:45shankarbStatusscheduled => resolved
2013-05-28 12:45shankarbFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/51de13657be6bc85ec907f7afce90c6fdeb15861 [^] => https://code.openbravo.com/erp/devel/pi/rev/4b94b5a758f85408462bb33987dd15117875a07f [^]
2013-05-28 12:45shankarbResolutionopen => fixed
2013-05-28 18:00AugustoMauchRegression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/b69625663ccc [^] => https://code.openbravo.com/erp/devel/pi/rev/797f69e6a899c12da183a16692453fc0bd1f7d7e [^]
2013-05-28 18:02AugustoMauchNote Added: 0059002
2013-05-28 18:02AugustoMauchStatusresolved => closed
2013-05-28 18:02AugustoMauchFixed in Version => 3.0MP24
2013-05-28 23:56hudsonbotCheckin
2013-05-28 23:56hudsonbotNote Added: 0059010
2013-05-28 23:57hudsonbotCheckin
2013-05-28 23:57hudsonbotNote Added: 0059012

Notes
(0058978)
hgbot   
2013-05-28 06:38   
Repository: erp/devel/pi
Changeset: 51de13657be6bc85ec907f7afce90c6fdeb15861
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Tue May 28 10:04:28 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/51de13657be6bc85ec907f7afce90c6fdeb15861 [^]

Fixes Issue 23922: Tab tree it is not working under some circumstances

The alias was removed even if it was at the end of the word. This resulted in incorrect hql where clause.
Replaced alias only if its the present at the beginning of the string.

---
M src/org/openbravo/erpCommon/utility/WindowTree.java
---
(0058983)
AugustoMauch   
2013-05-28 09:49   
It only replaces e. if it is at the beginning of the clause, it should replace it if it is a the beginning of a word
(0058984)
hgbot   
2013-05-28 10:45   
Repository: erp/devel/pi
Changeset: 4b94b5a758f85408462bb33987dd15117875a07f
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Tue May 28 14:13:20 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/4b94b5a758f85408462bb33987dd15117875a07f [^]

Related to Issue 23922 : Replace all occurences of alias

Earlier regex replaces only the first instance of the alias, now all instances of the alias are removed.

---
M src/org/openbravo/erpCommon/utility/WindowTree.java
---
(0059002)
AugustoMauch   
2013-05-28 18:02   
Code reviewed and verified in pi@3b9604eee5d7
(0059010)
hudsonbot   
2013-05-28 23:56   
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/4ecad5b5150f [^]

Maturity status: Test
(0059012)
hudsonbot   
2013-05-28 23:57   
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/4ecad5b5150f [^]

Maturity status: Test