Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0043047Openbravo ERPA. Platformpublic2020-01-29 11:012020-02-26 18:31
inigo_lerga 
inigo_lerga 
normalminorhave not tried
closedfixed 
5
 
3.0PR20Q2 
dmiguelez
Core
No
0043047: Apply new HQL Style in CostingRuleProcess.java
CostingRuleProcess.java has 10 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 11:01inigo_lergaNew Issue
2020-01-29 11:01inigo_lergaAssigned To => inigo_lerga
2020-01-29 11:01inigo_lergaModules => Core
2020-01-29 11:01inigo_lergaTriggers an Emergency Pack => No
2020-01-29 11:01inigo_lergaRelationship addedrelated to 0041287
2020-01-29 11:01inigo_lergaStatusnew => scheduled
2020-01-29 14:33inigo_lergaDescription Updatedbug_revision_view_page.php?rev_id=20254#r20254
2020-02-11 14:48inigo_lergaDescription Updatedbug_revision_view_page.php?rev_id=20336#r20336
2020-02-11 14:48inigo_lergaNote Added: 0117641
2020-02-11 14:48inigo_lergaNote Edited: 0117641bug_revision_view_page.php?bugnote_id=0117641#r20338
2020-02-11 14:49inigo_lergaNote Edited: 0117641bug_revision_view_page.php?bugnote_id=0117641#r20339
2020-02-26 18:31hgbotCheckin
2020-02-26 18:31hgbotNote Added: 0118131
2020-02-26 18:31hgbotStatusscheduled => resolved
2020-02-26 18:31hgbotResolutionopen => fixed
2020-02-26 18:31hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/292a1b2ca9748ecd9eb59493ba0c49776a99ba3c [^]
2020-02-26 18:31hgbotCheckin
2020-02-26 18:31hgbotNote Added: 0118132
2020-02-26 18:31hgbotCheckin
2020-02-26 18:31hgbotNote Added: 0118133
2020-02-26 18:31dmiguelezReview Assigned To => dmiguelez
2020-02-26 18:31dmiguelezNote Added: 0118134
2020-02-26 18:31dmiguelezStatusresolved => closed
2020-02-26 18:31dmiguelezFixed in Version => 3.0PR20Q2

Notes
(0117641)
inigo_lerga   
2020-02-11 14:48   
(edited on: 2020-02-11 14:49)
--Test Plan Mantis HQL queries--
Part of the modified hqls in this Issue can be executed
running the JUnit tests found in the TestCosting.java file.

#In this moment the modified HQLs are executed#


For the rest of them:
As the F&B International Group Admin role:
    - Create a new Organization wit the Initial Organization Setup.
      It ust be a Legal with accounting with F&B International Group
      as parent organization.
Log out and log in with the user for the preciously created Organization.
    - Enable Core functionality in Enterprise Module Management
    - Allow period control in the Organization and create a Calendar with
      an open period for this month.
    - Create a Business Partner with Vendor/Creditor capabilities.
    - Log out and Log in
    - Define a warehouse and assign it to this organization.
    - Define a payment method and assign it to this organization.
    - Define a Price List
    - Define a Tax Category
    - Create a new product
    - Define a Tax Rate
    - Create a new Purchase Order with the date of yesterday the desired amount
      of the previosly created product and the rest of the above parameters
      created/defined.
      Book the Purchase.
    - Create the corresponding Goods receipt and Purchase Invoice for the
      Purchase Order with the date of yesterday.
    - Create a Costing Rule with the Starting Date of today and the rest of fields as default.
      
    #In this moment the modified HQLs are executed#

(0118131)
hgbot   
2020-02-26 18:31   
Repository: erp/devel/pi
Changeset: 292a1b2ca9748ecd9eb59493ba0c49776a99ba3c
Author: Iñigo Lerga <inigo.lerga <at> openbravo.com>
Date: Tue Feb 11 14:50:08 2020 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/292a1b2ca9748ecd9eb59493ba0c49776a99ba3c [^]

fixes BUG-43047:Applied new HQL Style

---
M src/org/openbravo/costing/CostingRuleProcess.java
---
(0118132)
hgbot   
2020-02-26 18:31   
Repository: erp/devel/pi
Changeset: 90c38ad9f92471d1516f3db1d92a7b67d576fa65
Author: Iñigo Lerga <inigo.lerga <at> openbravo.com>
Date: Tue Feb 11 16:39:51 2020 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/90c38ad9f92471d1516f3db1d92a7b67d576fa65 [^]

related to ISSUE-43047: Applied Sonarlint suggestions

---
M src/org/openbravo/costing/CostingRuleProcess.java
---
(0118133)
hgbot   
2020-02-26 18:31   
Repository: erp/devel/pi
Changeset: e5a08609ddd0313da5fec6a63f61190b854c891c
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Wed Feb 26 18:30:53 2020 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/e5a08609ddd0313da5fec6a63f61190b854c891c [^]

Related to ISSUE-43047. Code Review changes:
Modified queries to have only three columns in select and insert clauses.
Having more columns than three makes it harder to understand which value
corresponds to which column.

---
M src/org/openbravo/costing/CostingRuleProcess.java
---
(0118134)
dmiguelez   
2020-02-26 18:31   
Code Review + Testing Ok