Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0026681Openbravo ERPA. Platformpublic2014-05-23 14:382014-08-11 09:49
caristu 
shankarb 
highminoralways
closedfixed 
5
pi 
3.0PR14Q43.0PR14Q4 
alostale
Core
No
0026681: Some records are not ordered properly in widgets
Not all records are ordered properly in some widgets. With a enough quantity of records, when scrolling down, the records are appearing without being sorted (See attached).
1) In an environment with about 150 invoices pending to be collected (Invoices processed and not payed yet), add the "Invoices to Collect" widget to the workspace

2) Maximize it and sort the records using any column. Scroll down, notice that some records are appearing without being sorted
No tags attached.
png WidgetSortErr.png (52,248) 2014-05-23 14:39
https://issues.openbravo.com/file_download.php?file_id=6945&type=bug
png
Issue History
2014-05-23 14:38caristuNew Issue
2014-05-23 14:38caristuAssigned To => AugustoMauch
2014-05-23 14:38caristuFile Added: WidgetSort.png
2014-05-23 14:38caristuModules => Core
2014-05-23 14:38caristuTriggers an Emergency Pack => No
2014-05-23 14:38caristuFile Deleted: WidgetSort.png
2014-05-23 14:39caristuFile Added: WidgetSortErr.png
2014-05-23 14:40caristuIssue Monitored: networkb
2014-05-23 14:43caristuRegression date => 2014-08-06
2014-05-23 14:43caristuversion => pi
2014-05-23 14:43caristuTarget Version => PR14Q3
2014-05-23 14:43caristuSummarySome records are not ordered properly in some widgets => Some records are not ordered properly in widgets
2014-05-26 16:43jonalegriaesarteResolution time => 1407276000
2014-05-26 16:43jonalegriaesarteRegression date2014-08-06 =>
2014-06-02 17:10guillermogilAssigned ToAugustoMauch => guillermogil
2014-06-03 13:51guillermogilNote Added: 0067706
2014-06-03 13:51guillermogilAssigned Toguillermogil => AugustoMauch
2014-06-16 12:48jonalegriaesarteTarget VersionPR14Q3 => PR14Q4
2014-07-30 06:29shankarbAssigned ToAugustoMauch => shankarb
2014-08-01 10:15shankarbStatusnew => scheduled
2014-08-01 10:15shankarbNote Added: 0069027
2014-08-01 10:15shankarbfix_in_branch => pi
2014-08-04 06:14shankarbReview Assigned To => AugustoMauch
2014-08-04 06:14shankarbfix_in_branchpi =>
2014-08-04 06:14shankarbIssue Monitored: AugustoMauch
2014-08-04 06:15hgbotCheckin
2014-08-04 06:15hgbotNote Added: 0069053
2014-08-04 06:15hgbotStatusscheduled => resolved
2014-08-04 06:15hgbotResolutionopen => fixed
2014-08-04 06:15hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/4f31d2d162f9f6804f2b3daa508b07e6a0b112ef [^]
2014-08-06 14:42AugustoMauchNote Added: 0069099
2014-08-06 14:42AugustoMauchStatusresolved => new
2014-08-06 14:42AugustoMauchResolutionfixed => open
2014-08-08 11:09AugustoMauchIssue End Monitor: AugustoMauch
2014-08-08 11:09AugustoMauchIssue Monitored: alostale
2014-08-08 11:10AugustoMauchReview Assigned ToAugustoMauch => alostale
2014-08-08 11:15hgbotCheckin
2014-08-08 11:15hgbotNote Added: 0069122
2014-08-08 11:15hgbotStatusnew => resolved
2014-08-08 11:15hgbotResolutionopen => fixed
2014-08-08 11:15hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/4f31d2d162f9f6804f2b3daa508b07e6a0b112ef [^] => http://code.openbravo.com/erp/devel/pi/rev/415f64b18378d3ffbe4e90a23f7184a7e12e51a9 [^]
2014-08-08 11:17AugustoMauchNote Added: 0069123
2014-08-08 18:54hudsonbotCheckin
2014-08-08 18:54hudsonbotNote Added: 0069254
2014-08-08 18:54hudsonbotCheckin
2014-08-08 18:54hudsonbotNote Added: 0069272
2014-08-11 09:49alostaleNote Added: 0069287
2014-08-11 09:49alostaleStatusresolved => closed
2014-08-11 09:49alostaleFixed in Version => 3.0PR14Q4

Notes
(0067706)
guillermogil   
2014-06-03 13:51   
The query that populates the widget does not take into account the order criteria, it just bring the records (0-75) and order them. the same with the next pages.
(0069027)
shankarb   
2014-08-01 10:15   
Fix pushed to try.
(0069053)
hgbot   
2014-08-04 06:15   
Repository: erp/devel/pi
Changeset: 4f31d2d162f9f6804f2b3daa508b07e6a0b112ef
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Fri Aug 01 11:48:12 2014 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/4f31d2d162f9f6804f2b3daa508b07e6a0b112ef [^]

Fixes issue 26681: Some records are not ordered properly in widgets

orderby clause is done at the query level and not after fetching data.
Sorting works in paginated records.

---
M modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListDataSource.java
---
(0069099)
AugustoMauch   
2014-08-06 14:42   
Does not work if the hql query contains an uppercase order by clause.

Steps to reproduce:
- Change the hql query of query/list widget from ... order by ... to ... ORDER BY ...
- Add that widget to the Workspace.
- Maximize its grid. The data is initially shown properly
- Try to order the data by clicking in a column title. An error will appear in the eclipse log and the data will not be loaded.
(0069122)
hgbot   
2014-08-08 11:15   
Repository: erp/devel/pi
Changeset: 415f64b18378d3ffbe4e90a23f7184a7e12e51a9
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Fri Aug 08 11:14:59 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/415f64b18378d3ffbe4e90a23f7184a7e12e51a9 [^]

Fixes issue 26681: Filtering in Query Widgets supports any letter case

The previous fix was taking from granted that the hql order by clause was going to be lowercase.

It was also handling a case that was never going to happen: a HQL query with a limit clause (hql does not support limit clauses).

---
M modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListDataSource.java
---
(0069123)
AugustoMauch   
2014-08-08 11:17   
Test plan:
- Modify the HQL query of the Orders to Collect widget to achieve having more than 100 registers by removing the where clause.
- Test different letter case combinations for the order by clause, at least "order by", "ORDER BY" and "Order By".
(0069254)
hudsonbot   
2014-08-08 18:54   
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/4450016dee64 [^]
Maturity status: Test
(0069272)
hudsonbot   
2014-08-08 18:54   
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/4450016dee64 [^]
Maturity status: Test
(0069287)
alostale   
2014-08-11 09:49   
code reviewed + tested