Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0043052Openbravo ERPA. Platformpublic2020-01-29 16:312020-02-07 12:28
inigo_lerga 
inigo_lerga 
normalminorhave not tried
closedfixed 
5
 
3.0PR20Q2 
dmiguelez
Core
No
0043052: Apply new HQL Style in CostingServer.java
CostingServer.java has 2 HQL queries with:
- the HQL is hard to read because of formatting
- and it is mixing txt and i.e PROPERTY_ID constant which is not recommended by default
-
Follow new format as in http://wiki.openbravo.com/wiki/HQL_Coding_Conventions [^]
No tags attached.
related to design defect 0041287 acknowledged Triage Platform Base Tracking issue: Convert HQL to apply new style 
Issue History
2020-01-29 16:31inigo_lergaNew Issue
2020-01-29 16:31inigo_lergaAssigned To => inigo_lerga
2020-01-29 16:31inigo_lergaModules => Core
2020-01-29 16:31inigo_lergaTriggers an Emergency Pack => No
2020-01-29 16:32inigo_lergaRelationship addedrelated to 0041287
2020-01-29 16:32inigo_lergaStatusnew => scheduled
2020-01-30 14:32inigo_lergaNote Added: 0117367
2020-02-07 12:26hgbotCheckin
2020-02-07 12:26hgbotNote Added: 0117557
2020-02-07 12:26hgbotStatusscheduled => resolved
2020-02-07 12:26hgbotResolutionopen => fixed
2020-02-07 12:26hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/06eba103c62081188feba0cc1df99a532059c982 [^]
2020-02-07 12:27hgbotCheckin
2020-02-07 12:27hgbotNote Added: 0117558
2020-02-07 12:27hgbotCheckin
2020-02-07 12:27hgbotNote Added: 0117559
2020-02-07 12:28dmiguelezReview Assigned To => dmiguelez
2020-02-07 12:28dmiguelezNote Added: 0117560
2020-02-07 12:28dmiguelezStatusresolved => closed
2020-02-07 12:28dmiguelezFixed in Version => 3.0PR20Q2

Notes
(0117367)
inigo_lerga   
2020-01-30 14:32   
Test Plan Mantis HQL queries:
As the F&B International Group Admin role:
    - Go to the Process Request window and select the
      record with "Costing Background process" in the Process
      field. Press the Unschedule Process button and then
      Close button in the popup window.

    - Create a new Process Request in this same window,
      with "F&B International Group" as client and "*" Organization.
      Set the Process to "Costing Background process" and Timing
      "Run Immediately". Save the record.
    
    - Go to the Purchase Order window and create a new record
      with "Bebidas Alegres, S.L." as Business Partner. Enter
      the Lines tab and crete a new record with Product
      "Cerveza Lager 0,5L" and 20 units as Ordered Quantity.
      Press the Book button and OK in the popup window.
      
    - Go to the Goods Receipt window and create a new record
      with "Bebidas Alegres, S.L." as Business Partner.
      Press the Create Lines From button and select the
      previously created Purchase Order in the Order field.
      Select the "Cerveza Lager 0,5L" record and press the Locator
      button in the Storage bin field. In the popuup window,
      select the Warehouse with Alias "Rn-0-0-0" and press OK.
      Press the OK button in the previous popup window to create
      the lines.
      Press the Complete button and OK in the popup window.

    - Go to the Process Request window, select the previously created
      Process request and press the Schedule Process button and then
      Close button in the popup window.
    #In this moment the first and last modified HQLs are executed#

    - Go to the Goods Receipt window and void the previously created
      record pressing the Close button and OK button in the popup window.

    - Go to the Process Request window, select the previously created
      Process request and press the Reschedule Process button and then
      Close button in the popup window.
    #In this moment the middle modified HQL is executed#
(0117557)
hgbot   
2020-02-07 12:26   
Repository: erp/devel/pi
Changeset: 06eba103c62081188feba0cc1df99a532059c982
Author: Iñigo Lerga <inigo.lerga <at> openbravo.com>
Date: Thu Jan 30 14:33:13 2020 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/06eba103c62081188feba0cc1df99a532059c982 [^]

fixes BUG-43052:Applied new HQL Style

---
M src/org/openbravo/costing/CostingServer.java
---
(0117558)
hgbot   
2020-02-07 12:27   
Repository: erp/devel/pi
Changeset: dd466c106593f9433885bdcb17fd357f1746db0d
Author: Iñigo Lerga <inigo.lerga <at> openbravo.com>
Date: Thu Jan 30 15:52:58 2020 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/dd466c106593f9433885bdcb17fd357f1746db0d [^]

related to ISSUE-43052: Applied Sonarlint suggestions

---
M src/org/openbravo/costing/CostingServer.java
---
(0117559)
hgbot   
2020-02-07 12:27   
Repository: erp/devel/pi
Changeset: a6c3459108a4c3e94c643caad351d0dad744fb3b
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Fri Feb 07 12:26:38 2020 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/a6c3459108a4c3e94c643caad351d0dad744fb3b [^]

Related to ISSUE-43052. Code Review changes:
* Formatted hql query
* Use id's instead of objects in hql query
* Extract logic into different methods to make the code
  more redable.

---
M src/org/openbravo/costing/CostingServer.java
---
(0117560)
dmiguelez   
2020-02-07 12:28   
Code Review + Testing Ok