Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0032157Openbravo ERP09. Financial managementpublic2016-02-08 13:302016-03-17 10:56
caristu 
AtulOpenbravo 
highminoralways
closedfixed 
5
pi 
 
vmromanos
Core
Production - Confirmed Stable
2014-11-20
3.0PR15Q1
https://code.openbravo.com/erp/devel/pi/rev/289b897908c3 [^]
No
0032157: Not possible to sort by unit price in Return from Customer p&e
Is not possible to sort by unit price in Return from Customer p&e.

The following error is displayed in the log after that:

867946fe 562280 [http-8082-5] ERROR org.hibernate.util.JDBCExceptionReporter - ERROR: invalid input syntax for type numeric: ""
  Position: 20857
867946fe 562280 [http-8082-5] ERROR org.openbravo.service.datasource.DataSourceServlet - could not execute query
org.hibernate.exception.DataException: could not execute query
    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:102)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
    at org.hibernate.loader.Loader.doList(Loader.java:2536)
...
1) Go to the [Return From Customer] window.
2) Create a new record in the header
3) Launch the Pick/Edit lines process
4) Sort by unit price. No results are shown.
It seems that the problem is caused in the order by clause injected by ReturnToFromCustomerVendorHQLTransformer
No tags attached.
depends on backport 00321843.0PR16Q1 closed AtulOpenbravo Not possible to sort by unit price in Return from Customer p&e 
depends on backport 00321853.0PR15Q4.3 closed AtulOpenbravo Not possible to sort by unit price in Return from Customer p&e 
depends on backport 00321863.0PR15Q3.6 closed AtulOpenbravo Not possible to sort by unit price in Return from Customer p&e 
related to defect 0032201 closed platform Unnescessary performance penalty while sorting and filtering column of HQL Datasources used in P&E windows 
Issue History
2016-02-08 13:30caristuNew Issue
2016-02-08 13:30caristuAssigned To => Triage Finance
2016-02-08 13:30caristuModules => Core
2016-02-08 13:30caristuTriggers an Emergency Pack => No
2016-02-08 13:47caristuRegression introduced in release => 3.0PR15Q1
2016-02-08 13:48caristuSeveritymajor => minor
2016-02-09 05:34AtulOpenbravoAssigned ToTriage Finance => AtulOpenbravo
2016-02-09 06:47AtulOpenbravoStatusnew => scheduled
2016-02-10 10:03AtulOpenbravoNote Added: 0084072
2016-02-10 10:05AtulOpenbravoRegression level => Production - Confirmed Stable
2016-02-10 10:05AtulOpenbravoRegression date => 2014-11-20
2016-02-10 10:05AtulOpenbravoRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/289b897908c3 [^]
2016-02-10 10:20AtulOpenbravoStatusscheduled => acknowledged
2016-02-10 10:21AtulOpenbravoStatusacknowledged => scheduled
2016-02-10 14:42psanjuanNote Added: 0084079
2016-02-10 14:49psanjuanNote Edited: 0084072bug_revision_view_page.php?bugnote_id=0084072#r11047
2016-02-10 15:10psanjuanNote Added: 0084080
2016-02-10 15:11psanjuanNote Edited: 0084072bug_revision_view_page.php?bugnote_id=0084072#r11048
2016-02-10 15:12psanjuanNote Edited: 0084080bug_revision_view_page.php?bugnote_id=0084080#r11050
2016-02-10 15:50psanjuanNote Edited: 0084080bug_revision_view_page.php?bugnote_id=0084080#r11051
2016-02-11 11:27AtulOpenbravoNote Edited: 0084072bug_revision_view_page.php?bugnote_id=0084072#r11067
2016-02-11 12:01vmromanosRelationship addedrelated to 0032201
2016-02-11 13:58psanjuanNote Added: 0084105
2016-02-11 17:06hgbotCheckin
2016-02-11 17:06hgbotNote Added: 0084115
2016-02-11 17:06hgbotStatusscheduled => resolved
2016-02-11 17:06hgbotResolutionopen => fixed
2016-02-11 17:06hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/408e578e367342a0e305f519b8bc8128b51d6a81 [^]
2016-02-11 17:08vmromanosReview Assigned To => vmromanos
2016-02-11 17:08vmromanosNote Added: 0084123
2016-02-11 17:08vmromanosStatusresolved => closed
2016-03-17 10:56hudsonbotCheckin
2016-03-17 10:56hudsonbotNote Added: 0085129

Notes
(0084072)
AtulOpenbravo   
2016-02-10 10:03   
(edited on: 2016-02-11 11:27)
Test Plan
- Go to the [Return From Customer] window.
- Create a new record in the header
- Launch the Pick/Edit lines process
- Sort by unit price. Proper sorting is done.
- Repeat sorting by rest of columns and check sorting is properly done.
- Repeat sorting by rest of columns and check sorting is properly done, after removing implicit filter.
- Repeat same steps for [Return To Vendor] Window.

(0084079)
psanjuan   
2016-02-10 14:42   
Issue verified.
(0084080)
psanjuan   
2016-02-10 15:10   
(edited on: 2016-02-10 15:50)
Same problem found, fix applied, while sorting by Order Nº field and Return Reason.

Same problem found, fix do not applied, while sorting by Order Nº field and Return Reason.

Please fix those two as well, so final fix is complete.

(0084105)
psanjuan   
2016-02-11 13:58   
Test Plan above verified.

Issue fixed and working.

Issue can be code reviewed and closed.
(0084115)
hgbot   
2016-02-11 17:06   
Repository: erp/devel/pi
Changeset: 408e578e367342a0e305f519b8bc8128b51d6a81
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Thu Feb 11 16:16:57 2016 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/408e578e367342a0e305f519b8bc8128b51d6a81 [^]

Fixes Issue 0032157: Not possible to sort by unit price in Return from
Customer p&e

In case of the Return From Customer for a numeric value of unit Price COALESCE
was being use with '' which should have been 0 instead, COALESCE for order no
was missing for RTC, additonal ReturnReasonLeftClause2 added to replace
EntityAlias.name in the transformeredHQL Query.

---
M src/org/openbravo/common/datasource/ReturnToFromCustomerVendorHQLTransformer.java
---
(0084123)
vmromanos   
2016-02-11 17:08   
Code review + testing OK
(0085129)
hudsonbot   
2016-03-17 10: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/b22fb0500156 [^]
Maturity status: Test