Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0038735Openbravo ERP04. Warehouse managementpublic2018-06-12 09:322018-07-03 09:04
caristu 
AtulOpenbravo 
urgentminorhave not tried
closedfixed 
5
 
3.0PR18Q3 
dmiguelez
Core
No
0038735: incorrect query in ReservationUtils
The HQL query defined in the getReservationStockFromStorageDetail method of the ReservationUtils has incorrect bracket balance.

Hibernate 3.6 allows it whereas it is not allowed in newer versions.
1. Using Hibernate 5.3
2. Execute the ReferencedInventoryBoxFullReservationTest.allTests test
  -> ERROR: org.hibernate.hql.internal.ast.QuerySyntaxException: expecting EOF, found ')' near line 1, column 276 [select rs from MaterialMgmtReservationStock rs join rs.reservation r where r.product = :product and coalesce(rs.storageBin, r.storageBin) = :storageBin and coalesce(rs.attributeSetValue, r.attributeSetValue) = :attributeSetValue and r.uOM = :uom and rs.quantity > rs.released)]
See attached file with the proposal
No tags attached.
blocks feature request 0037064 closed caristu upgrade hibernate to 5.3.2 
diff reservationUtils.diff (722) 2018-06-12 09:33
https://issues.openbravo.com/file_download.php?file_id=11849&type=bug
Issue History
2018-06-12 09:32caristuNew Issue
2018-06-12 09:32caristuAssigned To => Triage Finance
2018-06-12 09:32caristuModules => Core
2018-06-12 09:32caristuTriggers an Emergency Pack => No
2018-06-12 09:32caristuIssue generated from0038655
2018-06-12 09:33caristuRelationship addedblocks 0037064
2018-06-12 09:33caristuProposed Solution updated
2018-06-12 09:33caristuProposed Solution updated
2018-06-12 09:33caristuFile Added: reservationUtils.diff
2018-06-12 09:55dmiguelezAssigned ToTriage Finance => AtulOpenbravo
2018-06-13 20:56AtulOpenbravoStatusnew => scheduled
2018-06-14 03:11AtulOpenbravoNote Added: 0105135
2018-06-26 13:11hgbotCheckin
2018-06-26 13:11hgbotNote Added: 0105448
2018-06-26 13:11hgbotStatusscheduled => resolved
2018-06-26 13:11hgbotResolutionopen => fixed
2018-06-26 13:11hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/2b071325db7c1a52fa433ad07cc89376a8c6a431 [^]
2018-06-26 13:12dmiguelezReview Assigned To => dmiguelez
2018-06-26 13:12dmiguelezNote Added: 0105449
2018-06-26 13:12dmiguelezStatusresolved => closed
2018-06-26 13:12dmiguelezFixed in Version => 3.0PR18Q3
2018-06-27 13:04hudsonbotCheckin
2018-06-27 13:04hudsonbotNote Added: 0105469
2018-07-03 09:04caristuIssue cloned0038877

Notes
(0105135)
AtulOpenbravo   
2018-06-14 03:11   
Test Plan
- Use hibernate 5.3 (Platform team development repo:https://code.openbravo.com/erp/devel/pi-hb53 [^])
- Run junit test ReferencedInventoryBoxFullReservationTest.
- Realize that test is executed successfully.

- Use latest pi.
- Run junit test ReferencedInventoryBoxFullReservationTest.
- Realize that test is executed successfully.
(0105448)
hgbot   
2018-06-26 13:11   
Repository: erp/devel/pi
Changeset: 2b071325db7c1a52fa433ad07cc89376a8c6a431
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Thu Jun 14 06:34:24 2018 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/2b071325db7c1a52fa433ad07cc89376a8c6a431 [^]

Fixes Issue 38735: incorrect query in ReservationUtils

HQL query in getReservationStockFromStorageDetail method
in ReservationUtils.java had ")" end brace at end with out
"(" start brace in the query. This is not correct but was
allowed in hibernate version 3.6, but hibernate version 5.3
does not allow such error in query. Hence the query is modified
by removing the ")" end brace.

---
M src/org/openbravo/materialmgmt/ReservationUtils.java
---
(0105449)
dmiguelez   
2018-06-26 13:12   
Code Review + Testing Ok
(0105469)
hudsonbot   
2018-06-27 13:04   
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/7721d0db9ee1 [^]
Maturity status: Test