Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0042884Openbravo ERPA. Platformpublic2020-01-15 13:342020-02-13 09:09
inigo_lerga 
inigo_lerga 
normalminorhave not tried
closedfixed 
5
 
 
Core
No
0042884: Apply new HQL Style in StockReservationPickAndEditDataSource.java
StockReservationPickAndEditDataSource.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-01-15 13:34inigo_lergaNew Issue
2020-01-15 13:34inigo_lergaAssigned To => inigo_lerga
2020-01-15 13:34inigo_lergaModules => Core
2020-01-15 13:34inigo_lergaTriggers an Emergency Pack => No
2020-01-15 13:34inigo_lergaRelationship addedrelated to 0041287
2020-01-16 08:20inigo_lergaStatusnew => scheduled
2020-01-16 13:33inigo_lergaNote Added: 0116926
2020-01-16 14:06inigo_lergaDescription Updatedbug_revision_view_page.php?rev_id=20145#r20145
2020-01-16 17:08inigo_lergaNote Edited: 0116926bug_revision_view_page.php?bugnote_id=0116926#r20151
2020-01-21 12:57hgbotCheckin
2020-01-21 12:57hgbotNote Added: 0117138
2020-01-21 12:57hgbotStatusscheduled => resolved
2020-01-21 12:57hgbotResolutionopen => fixed
2020-01-21 12:57hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/bdd233669137f38060a51db25e69f08a98e35032 [^]
2020-01-21 12:57hgbotCheckin
2020-01-21 12:57hgbotNote Added: 0117139
2020-01-21 12:57hgbotCheckin
2020-01-21 12:57hgbotNote Added: 0117140
2020-02-13 09:09inigo_lergaStatusresolved => closed

Notes
(0116926)
inigo_lerga   
2020-01-16 13:33   
(edited on: 2020-01-16 17:08)
Test Plan Mantis HQL queries in lines 1063, 1461, 1882, 1197, 1281:
As the F&B International Group Admin role:
    - Go to the Preference window and create a new record with
      Organization * and "Enable Stock Reservations" as Property.
      Write "Y" as value and save the record.
    - Go to the Stock Reservation window and create a new
      record with "F&B España - Región Norte" as Organization
      and "Cerveza Lager 0,5L" with 5 units in the Quantity
      field.
      Press the Manage Stock button.
      #In this moment the modified HQLs are executed#
    - Select the only record that is shown in the popup window
      and write 5 in the Quantity field. Press the Done button.

Test Plan Mantis HQL query in line 1812:
Once completed the previous steps:
    - Press the Manage Stock button again.
      #In this moment the modified HQL is executed#
    - Press the Done button.

Test Plan Mantis HQL query in line 1852:
Once completed the previous steps:
    - Go to the Purchase Order window and create a new record with
      "Bebidas Alegres, S.L." as Business Partner.
      Go to the Lines Tab and create a new record with the Product
      "Cerveza Ale 0,5L" and 10 units as Ordered Quantity.
      Save and press the Book button and then OK button.
    - Go back to the Stock Reservation window and create a new
      record with "F&B España - Región Norte" as Organization
      and "Cerveza Ale 0,5L".
      Press the Manage Stock button.
      #In this moment the modified HQL is executed#

(0117138)
hgbot   
2020-01-21 12:57   
Repository: erp/devel/pi
Changeset: bdd233669137f38060a51db25e69f08a98e35032
Author: Iñigo Lerga <inigo.lerga <at> openbravo.com>
Date: Thu Jan 16 12:56:58 2020 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/bdd233669137f38060a51db25e69f08a98e35032 [^]

fixes BUG-42884:Applied new HQL Style

---
M src/org/openbravo/common/datasource/StockReservationPickAndEditDataSource.java
---
(0117139)
hgbot   
2020-01-21 12:57   
Repository: erp/devel/pi
Changeset: 098f1e0ea459a0bae60d3c0612126bf35a479b3e
Author: Iñigo Lerga <inigo.lerga <at> openbravo.com>
Date: Thu Jan 16 14:03:19 2020 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/098f1e0ea459a0bae60d3c0612126bf35a479b3e [^]

related to ISSUE-42884: Applied Sonarlint suggestions

---
M src/org/openbravo/common/datasource/StockReservationPickAndEditDataSource.java
---
(0117140)
hgbot   
2020-01-21 12:57   
Repository: erp/devel/pi
Changeset: b7e37b36d21f1b781c0a8949b867204615ee9b7e
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Tue Jan 21 09:52:27 2020 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/b7e37b36d21f1b781c0a8949b867204615ee9b7e [^]

Related to ISSUE-42884. Code Review changes:
* Use id instead of object in query
* Extracted logic to method to improve redability
* Use StringUtils.isEmpty instead of checking if the string
  is null or empty manually

---
M src/org/openbravo/common/datasource/StockReservationPickAndEditDataSource.java
---