Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0043388Openbravo ERPA. Platformpublic2020-03-02 16:192020-03-06 14:21
inigo_lerga 
inigo_lerga 
normalminorhave not tried
closedfixed 
5
 
3.0PR20Q2 
dmiguelez
Core
No
0043388: Apply new HQL Style in ConversionRateEventHandler.java
ConversionRateEventHandler.java has one HQL query 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 platform Tracking issue: Convert HQL to apply new style 
Issue History
2020-03-02 16:19inigo_lergaNew Issue
2020-03-02 16:19inigo_lergaAssigned To => inigo_lerga
2020-03-02 16:19inigo_lergaModules => Core
2020-03-02 16:19inigo_lergaTriggers an Emergency Pack => No
2020-03-02 16:19inigo_lergaRelationship addedrelated to 0041287
2020-03-02 16:19inigo_lergaStatusnew => scheduled
2020-03-03 12:14inigo_lergaNote Added: 0118292
2020-03-06 14:19dmiguelezNote Added: 0118386
2020-03-06 14:20hgbotCheckin
2020-03-06 14:20hgbotNote Added: 0118387
2020-03-06 14:20hgbotStatusscheduled => resolved
2020-03-06 14:20hgbotResolutionopen => fixed
2020-03-06 14:20hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/864d0cc875aceea8f2cc80ca9daac4f834e14dee [^]
2020-03-06 14:20hgbotCheckin
2020-03-06 14:20hgbotNote Added: 0118388
2020-03-06 14:20hgbotCheckin
2020-03-06 14:20hgbotNote Added: 0118389
2020-03-06 14:21dmiguelezReview Assigned To => dmiguelez
2020-03-06 14:21dmiguelezNote Added: 0118390
2020-03-06 14:21dmiguelezStatusresolved => closed
2020-03-06 14:21dmiguelezFixed in Version => 3.0PR20Q2

Notes
(0118292)
inigo_lerga   
2020-03-03 12:14   
--Test Plan Mantis HQL queries--
As the F&B International Group Admin role:
  - Go to the Conversion Rates window and create a
    new record with "AOA" as Currency.
    Set any date desired prior to today and "1"
    as Multiple Rate By field.
    Leave the rest of fields as default.
    Save the record.
  
  #In this moment the modified HQL is executed#
(0118386)
dmiguelez   
2020-03-06 14:19   
Test Plan II

Log in as F&B International Group Admin

Go to Conversion Rates Window and create a new record with:
  * Organization: *
  * Currency: USD
  * To Currency: EUR
  * Valid From Date: 06-03-2020
  * Multiply Rate By: 2
Try to save the record, it fails with the message: Saving failed. There are different conversion rates with same dates.
(0118387)
hgbot   
2020-03-06 14:20   
Repository: erp/devel/pi
Changeset: 864d0cc875aceea8f2cc80ca9daac4f834e14dee
Author: Iñigo Lerga <inigo.lerga <at> openbravo.com>
Date: Tue Mar 03 09:46:52 2020 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/864d0cc875aceea8f2cc80ca9daac4f834e14dee [^]

fixes BUG-43388:Applied new HQL Style

---
M src/org/openbravo/event/ConversionRateEventHandler.java
---
(0118388)
hgbot   
2020-03-06 14:20   
Repository: erp/devel/pi
Changeset: 2e054b8f16dcaf7665537e2ec3a3c6bd43d4e9c7
Author: Iñigo Lerga <inigo.lerga <at> openbravo.com>
Date: Tue Mar 03 09:59:55 2020 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/2e054b8f16dcaf7665537e2ec3a3c6bd43d4e9c7 [^]

related to ISSUE-43388: Finals added

-Finals added
-No Sonarlint suggestions found

---
M src/org/openbravo/event/ConversionRateEventHandler.java
---
(0118389)
hgbot   
2020-03-06 14:20   
Repository: erp/devel/pi
Changeset: 9466c9337936130a83c31150391ca3a764491afb
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Fri Mar 06 14:20:35 2020 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/9466c9337936130a83c31150391ca3a764491afb [^]

Related to ISSUE-43388. Code Review changes:
Retrieve first the query into an object and then do the !list.isEmpty() comparison.
The reason for this change is to make more obvius the list empty comparison
while reading the code.

---
M src/org/openbravo/event/ConversionRateEventHandler.java
---
(0118390)
dmiguelez   
2020-03-06 14:21   
Code Review + Testing Ok