Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0032912Openbravo ERPA. Platformpublic2016-05-09 19:492016-06-17 19:37
caristu 
NaroaIriarte 
immediateminoralways
closedfixed 
5
 
3.0PR16Q3 
caristu
Core
Pre packaging ( pi )
2016-04-08
pi
https://code.openbravo.com/erp/devel/pi/rev/69d2b535ae86 [^]
No
0032912: Error after refreshing browser having a child tab opened
The following error appears after refreshing the browser having a child tab opened: unexpected token: and near line 1, column 56 ....
1) Go to the [Sales Order] window, select an existing order in the header
2) Navigate to the [Lines] tab and open a record in form view
3) Refresh the browser
In line 158 of DefaultDataSourceService, replace:

if (parameters.get(JsonConstants.WHERE_AND_FILTER_CLAUSE) != null

with

if (!StringUtils.isBlank(parameters.get(JsonConstants.WHERE_AND_FILTER_CLAUSE))

It would also be better to do the oposite comparisons to prevent negation in the if statement.
No tags attached.
related to defect 0032911 acknowledged Triage Platform Base Wrong selector request after refreshing the browser 
caused by feature request 00326103.0PR16Q3 closed NaroaIriarte standard datasources shouldn't accept where parameter by default 
Issue History
2016-05-09 19:49caristuNew Issue
2016-05-09 19:49caristuAssigned To => platform
2016-05-09 19:49caristuModules => Core
2016-05-09 19:49caristuTriggers an Emergency Pack => No
2016-05-10 09:10caristuRegression level => Pre packaging ( pi )
2016-05-10 09:10caristuRegression date => 2016-04-08
2016-05-10 09:10caristuRegression introduced in release => pi
2016-05-10 09:10caristuRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/69d2b535ae86 [^]
2016-05-10 09:10caristuRelationship addedrelated to 0032911
2016-05-10 09:10caristuRelationship addedcaused by 0032610
2016-05-10 09:22caristuProposed Solution updated
2016-05-10 09:36NaroaIriarteAssigned Toplatform => NaroaIriarte
2016-05-10 10:20caristuStatusnew => scheduled
2016-05-10 10:33NaroaIriarteStatusscheduled => acknowledged
2016-05-10 14:13hgbotCheckin
2016-05-10 14:13hgbotNote Added: 0086354
2016-05-10 14:13hgbotStatusacknowledged => resolved
2016-05-10 14:13hgbotResolutionopen => fixed
2016-05-10 14:13hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/3ae4e605e43f05246fdd51bac34f47b14ad9f785 [^]
2016-05-11 12:01NaroaIriarteReview Assigned To => caristu
2016-05-11 12:29hgbotCheckin
2016-05-11 12:29hgbotNote Added: 0086373
2016-05-12 15:15hgbotCheckin
2016-05-12 15:15hgbotNote Added: 0086408
2016-05-12 17:15hgbotCheckin
2016-05-12 17:15hgbotNote Added: 0086423
2016-05-12 17:19caristuNote Added: 0086424
2016-05-12 17:19caristuStatusresolved => closed
2016-05-12 17:19caristuFixed in Version => 3.0PR16Q3
2016-06-17 19:37hudsonbotCheckin
2016-06-17 19:37hudsonbotNote Added: 0087531
2016-06-17 19:37hudsonbotCheckin
2016-06-17 19:37hudsonbotNote Added: 0087532
2016-06-17 19:37hudsonbotCheckin
2016-06-17 19:37hudsonbotNote Added: 0087535
2016-06-17 19:37hudsonbotCheckin
2016-06-17 19:37hudsonbotNote Added: 0087537

Notes
(0086354)
hgbot   
2016-05-10 14:13   
Repository: erp/devel/pi
Changeset: 3ae4e605e43f05246fdd51bac34f47b14ad9f785
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Tue May 10 10:56:40 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/3ae4e605e43f05246fdd51bac34f47b14ad9f785 [^]

Fixed issue 32912: If a child tab is opened an error was got after refreshing

This was caused because having an empty string as where clause was not avoided,
so, in the code there was a line which was adding an "and" after a where clause
and this was also happening when the where clause was an empty string.
To fix this, the condition has been changed, now it checks if it is an empty string
instead a null where clause.

---
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DefaultDataSourceService.java
---
(0086373)
hgbot   
2016-05-11 12:29   
Repository: erp/devel/pi
Changeset: 641370759303cafc3fe59cf0f0f84dfe863e208a
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Wed May 11 12:28:00 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/641370759303cafc3fe59cf0f0f84dfe863e208a [^]

Related to issue 32912: Test added to check the correct behavior when refresh

When the WHERE_AND_FILTER_CLAUSE parameter was an empty string, the
behavior was wrong, it was adding an "and" at the beginning of the
where clause and this was not corret. This behavior has been fixed and this
test has been added to check that the datasource response is now correct.
The parameters used in the datasource of this test are the same paramertes
that where used in the datasource of the child tab of the "Price List" window
after refreshing the browser.
This is to imitate the behavior of refreshing the browser having a child tab opened.
The fact of having these parameters, makes that the WHERE_AND_FILTER_CLAUSE parameter
is the empty string, so we can now check that the request works fine now.

---
M src-test/src/org/openbravo/test/AllWebserviceTests.java
A src-test/src/org/openbravo/test/datasource/EmptyStringWhereAndFilterClauseParameter.java
---
(0086408)
hgbot   
2016-05-12 15:15   
Repository: erp/devel/pi
Changeset: eea6dae452516f64b8c17e98eead11774de42d01
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Thu May 12 11:32:36 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/eea6dae452516f64b8c17e98eead11774de42d01 [^]

Related to issue 32912: The test has been improved

The test now checks the correct behavior of the Storage Bin subtab
(of the Warehouse and Storage Bins window).
It has now a private method which is the one that fills up the parameters map.

---
M src-test/src/org/openbravo/test/datasource/EmptyStringWhereAndFilterClauseParameter.java
---
(0086423)
hgbot   
2016-05-12 17:15   
Repository: erp/devel/pi
Changeset: 27592b2005c6d0a88a9ebf8b769e9e7460b602b8
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Thu May 12 17:14:39 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/27592b2005c6d0a88a9ebf8b769e9e7460b602b8 [^]

Related to issue 32912: The test has been improved

The test has been improved.

---
M src-test/src/org/openbravo/test/datasource/EmptyStringWhereAndFilterClauseParameter.java
---
(0086424)
caristu   
2016-05-12 17:19   
Code reviewed and tested OK on pi@ebe472e1174d.

The subtab is opened correctly after refreshing the browser.
(0087531)
hudsonbot   
2016-06-17 19:37   
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/0dc7be081b1c [^]
Maturity status: Test
(0087532)
hudsonbot   
2016-06-17 19:37   
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/0dc7be081b1c [^]
Maturity status: Test
(0087535)
hudsonbot   
2016-06-17 19:37   
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/0dc7be081b1c [^]
Maturity status: Test
(0087537)
hudsonbot   
2016-06-17 19:37   
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/0dc7be081b1c [^]
Maturity status: Test