Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0043249Openbravo ERPA. Platformpublic2020-02-18 12:432020-03-06 11:34
inigo_lerga 
inigo_lerga 
normalminorhave not tried
closedfixed 
5
 
3.0PR20Q2 
dmiguelez
Core
No
0043249: Apply new HQL Style in RMInsertOrphanLine.java
RMInsertOrphanLine.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 platform Tracking issue: Convert HQL to apply new style 
Issue History
2020-02-18 12:43inigo_lergaNew Issue
2020-02-18 12:43inigo_lergaAssigned To => platform
2020-02-18 12:43inigo_lergaModules => Core
2020-02-18 12:43inigo_lergaTriggers an Emergency Pack => No
2020-02-18 12:44inigo_lergaAssigned Toplatform => inigo_lerga
2020-02-18 12:44inigo_lergaRelationship addedrelated to 0041287
2020-02-18 14:24inigo_lergaStatusnew => scheduled
2020-02-18 15:36inigo_lergaNote Added: 0117917
2020-03-06 11:33hgbotCheckin
2020-03-06 11:33hgbotNote Added: 0118360
2020-03-06 11:33hgbotStatusscheduled => resolved
2020-03-06 11:33hgbotResolutionopen => fixed
2020-03-06 11:33hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a81b4b890f277763b06be015fee0a56396657b62 [^]
2020-03-06 11:33hgbotCheckin
2020-03-06 11:33hgbotNote Added: 0118361
2020-03-06 11:33hgbotCheckin
2020-03-06 11:33hgbotNote Added: 0118362
2020-03-06 11:34dmiguelezReview Assigned To => dmiguelez
2020-03-06 11:34dmiguelezNote Added: 0118363
2020-03-06 11:34dmiguelezStatusresolved => closed
2020-03-06 11:34dmiguelezFixed in Version => 3.0PR20Q2

Notes
(0117917)
inigo_lerga   
2020-02-18 15:36   
--Test Plan Mantis HQL queries--
As the F&B International Group Admin role:
    - Go to the Return from Customer window (with the
      "RM Allow Orphan Line" preference enabled) Admin
      create a new record with any Business Partner.
    - Press the Insert Orphan Line button.
      In the popup window select any product and any
      quantity in the returned field. Press the Ok button.
      
    #In this moment the modified HQL is executed#
(0118360)
hgbot   
2020-03-06 11:33   
Repository: erp/devel/pi
Changeset: a81b4b890f277763b06be015fee0a56396657b62
Author: Iñigo Lerga <inigo.lerga <at> openbravo.com>
Date: Tue Feb 18 14:25:09 2020 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/a81b4b890f277763b06be015fee0a56396657b62 [^]

fixes BUG-43249:Applied new HQL Style

---
M src/org/openbravo/erpCommon/ad_actionButton/RMInsertOrphanLine.java
---
(0118361)
hgbot   
2020-03-06 11:33   
Repository: erp/devel/pi
Changeset: 002d9667ce1ed344ded464670e5ff653ac3c8980
Author: Iñigo Lerga <inigo.lerga <at> openbravo.com>
Date: Tue Feb 18 15:30:58 2020 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/002d9667ce1ed344ded464670e5ff653ac3c8980 [^]

related to ISSUE-43249: 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/RMInsertOrphanLine.java
---
(0118362)
hgbot   
2020-03-06 11:33   
Repository: erp/devel/pi
Changeset: 6a58990c053eae73f3b3412b7e599d111e1c6336
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Fri Feb 28 09:05:35 2020 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/6a58990c053eae73f3b3412b7e599d111e1c6336 [^]

Related to ISSUE-43249: Code Review changes:
* Use id's instead of objects in hql queries
* Reorder methods
* Moved logic from methods into main flow as it is important
  to understand the exceptions that are being managed, and those
  were hidden in the new methods.

---
M src/org/openbravo/erpCommon/ad_actionButton/RMInsertOrphanLine.java
---
(0118363)
dmiguelez   
2020-03-06 11:34   
Code Review + Testing Ok