Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0043232Openbravo ERPA. Platformpublic2020-02-17 13:082020-03-02 09:53
inigo_lerga 
inigo_lerga 
normalminorhave not tried
closedfixed 
5
 
3.0PR20Q2 
dmiguelez
Core
No
0043232: Apply new HQL Style in ProcessGoods.java
ProcessGoods.java has two 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-02-17 13:08inigo_lergaNew Issue
2020-02-17 13:08inigo_lergaAssigned To => inigo_lerga
2020-02-17 13:08inigo_lergaModules => Core
2020-02-17 13:08inigo_lergaTriggers an Emergency Pack => No
2020-02-17 13:08inigo_lergaRelationship addedrelated to 0041287
2020-02-18 09:40inigo_lergaStatusnew => scheduled
2020-02-18 10:23inigo_lergaNote Added: 0117904
2020-02-18 10:27inigo_lergaDescription Updatedbug_revision_view_page.php?rev_id=20390#r20390
2020-02-18 12:18inigo_lergaNote Edited: 0117904bug_revision_view_page.php?bugnote_id=0117904#r20397
2020-03-02 09:51hgbotCheckin
2020-03-02 09:51hgbotNote Added: 0118220
2020-03-02 09:51hgbotStatusscheduled => resolved
2020-03-02 09:51hgbotResolutionopen => fixed
2020-03-02 09:51hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/4b59d3934e29dfa4f41a592aff8f707ab4973b85 [^]
2020-03-02 09:51hgbotCheckin
2020-03-02 09:51hgbotNote Added: 0118221
2020-03-02 09:51hgbotCheckin
2020-03-02 09:51hgbotNote Added: 0118222
2020-03-02 09:53dmiguelezReview Assigned To => dmiguelez
2020-03-02 09:53dmiguelezNote Added: 0118224
2020-03-02 09:53dmiguelezStatusresolved => closed
2020-03-02 09:53dmiguelezFixed in Version => 3.0PR20Q2

Notes
(0117904)
inigo_lerga   
2020-02-18 10:23   
(edited on: 2020-02-18 12:18)
--Test Plan Mantis HQL queries--
As the F&B International Group Admin role:
    - Go to the Goods Shipment window and create a new record
      with any Business Partner desired.
    - Go to the Lines Tab and create a new Line with
      "Cerveza Ale 0,5L" as Product and 1 as Movement Quantity.
    - Press the Complete button.
    
    #In this moment the modified HQL is executed#

As the F&B International Group Admin role:
    - Go to the Goods Receipt and create a new record
      with "Bebidas Alegres, S.L." as Business Partner.
    - Go to the Lines Tab and create a new line with
      "Cerveza Ale 0,5L" as Product and any quantity desired.
    - Press the Complete button and OK button in the popup
      window.
      Press now the Close button and OK button in the popup
      window to Void the Receipt.

    #In this moment the modified HQL is executed#

(0118220)
hgbot   
2020-03-02 09:51   
Repository: erp/devel/pi
Changeset: 4b59d3934e29dfa4f41a592aff8f707ab4973b85
Author: Iñigo Lerga <inigo.lerga <at> openbravo.com>
Date: Tue Feb 18 10:46:34 2020 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/4b59d3934e29dfa4f41a592aff8f707ab4973b85 [^]

fixes BUG-43232:Applied new HQL Style

---
M src/org/openbravo/erpCommon/ad_actionButton/ProcessGoods.java
---
(0118221)
hgbot   
2020-03-02 09:51   
Repository: erp/devel/pi
Changeset: 2910c7e93da3eac53ae91a512b3e8cfe9fa000e7
Author: Iñigo Lerga <inigo.lerga <at> openbravo.com>
Date: Thu Feb 27 17:07:41 2020 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/2910c7e93da3eac53ae91a512b3e8cfe9fa000e7 [^]

related to ISSUE-43232: Applied Sonarlint suggestions and more

Sonarlint suggestions applied.
Finals added.
Code refactored to be more legible in different methods.

---
M src/org/openbravo/erpCommon/ad_actionButton/ProcessGoods.java
---
(0118222)
hgbot   
2020-03-02 09:51   
Repository: erp/devel/pi
Changeset: fe4003f3aa4db4f19bfdca4c390e3fd3903e55a7
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Thu Feb 27 18:05:09 2020 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/fe4003f3aa4db4f19bfdca4c390e3fd3903e55a7 [^]

Related to ISSUE-43232. Code Review Changes:
* Rearranged methods to follow a more logical structure
* Extract code from method getGoodsShipmentInOut as it was hidding
  important logic
* Renamed method parseDateGoodsShipmentInOut to getFormatedDateParameters
* Use id's instead of objects in hql queries
* Use receiptId as a parameter instead of retrieving the full object
  to return the id

---
M src/org/openbravo/erpCommon/ad_actionButton/ProcessGoods.java
---
(0118224)
dmiguelez   
2020-03-02 09:53   
Code Review + Testing Ok