Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0042787Openbravo ERP02. Master data managementpublic2020-01-10 06:442020-01-17 09:54
AtulOpenbravo 
AtulOpenbravo 
normalminorhave not tried
closedfixed 
5
 
3.0PR20Q2 
dmiguelez
Core
No
0042787: Apply new HQL style in ManageVariantsDS
1. Avoid use of StringBuilder use normal Strings.
2. HQL formatting is important for improving readability.
3. Avoid use of Property Constant for eg: ProductCharacteristicValue.ENTITY_NAME, ProductCharacteristicValue.PROPERTY_PRODUCT, ProductCharacteristicValue.PROPERTY_CHARACTERISTIC, ProductCharacteristicValue.PROPERTY_CHARACTERISTICVALUE, etc
-
Follow new style available here 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-10 06:44AtulOpenbravoNew Issue
2020-01-10 06:44AtulOpenbravoAssigned To => AtulOpenbravo
2020-01-10 06:44AtulOpenbravoModules => Core
2020-01-10 06:44AtulOpenbravoTriggers an Emergency Pack => No
2020-01-10 06:44AtulOpenbravoIssue generated from0042786
2020-01-10 06:44AtulOpenbravoRelationship addedrelated to 0041287
2020-01-13 11:17AtulOpenbravoStatusnew => scheduled
2020-01-13 11:17AtulOpenbravoNote Added: 0116791
2020-01-17 09:53hgbotCheckin
2020-01-17 09:53hgbotNote Added: 0116981
2020-01-17 09:53hgbotStatusscheduled => resolved
2020-01-17 09:53hgbotResolutionopen => fixed
2020-01-17 09:53hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/c84c0562635aec006eaf2672b45b4cb4ec984cf7 [^]
2020-01-17 09:54hgbotCheckin
2020-01-17 09:54hgbotNote Added: 0116982
2020-01-17 09:54hgbotCheckin
2020-01-17 09:54hgbotNote Added: 0116983
2020-01-17 09:54dmiguelezReview Assigned To => dmiguelez
2020-01-17 09:54dmiguelezNote Added: 0116984
2020-01-17 09:54dmiguelezStatusresolved => closed
2020-01-17 09:54dmiguelezFixed in Version => 3.0PR20Q2

Notes
(0116791)
AtulOpenbravo   
2020-01-13 11:17   
Test Plan
- Define a Product Characteristics, set Variant = Yes, Explode Configuration Tab = Yes
- Add records in Value Tab
- Add record in Subset Tab
- Add records in Subset value Tab.
- Create a Generic Product
- Add above Characteristics defined in Product Window Characteristics Tab.
- Run Create Variants process.
- Realize that Variant Products are created successfully.
- Execute Manage Variants.
- Realize that Variants Products are shown in the P&E window.
- Select any Product and try to modify name of one of Product
- Click on Done button.
- Realize that process is successful and name of Product is updated accordingly.
(0116981)
hgbot   
2020-01-17 09:53   
Repository: erp/devel/pi
Changeset: c84c0562635aec006eaf2672b45b4cb4ec984cf7
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Mon Jan 13 14:25:28 2020 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/c84c0562635aec006eaf2672b45b4cb4ec984cf7 [^]

Fixes BUG-42787: Apply new HQL style in ManageVariantsDS

**Removed used of StringBuilder and Property constants
**Applied new HWL style to improve readability

---
M src/org/openbravo/materialmgmt/ManageVariantsDS.java
---
(0116982)
hgbot   
2020-01-17 09:54   
Repository: erp/devel/pi
Changeset: 23dacd16acaa4279e58f3ca0a0593e008142475c
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Tue Jan 14 09:21:40 2020 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/23dacd16acaa4279e58f3ca0a0593e008142475c [^]

Related To ISSUE-42787:Apply new HQL formatting/style in
ManageVariantsDS, apply SonarLint suggestions

**Constant names to match reg. exp ^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$
**Use StringBuilder for few String variables like strChDesc,
searchKey and strKeyId
**Rename method parameters to match reg exp
^[a-z][a-zA-Z0-9]*$
** Use primitive type boolean instead of Boolean when using
condition part in ternary operator in return statement

---
M src/org/openbravo/materialmgmt/ManageVariantsDS.java
---
(0116983)
hgbot   
2020-01-17 09:54   
Repository: erp/devel/pi
Changeset: d18ec79bbbf2da003c74b80d4618a03844dca116
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Fri Jan 17 09:53:41 2020 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/d18ec79bbbf2da003c74b80d4618a03844dca116 [^]

Related to ISSUE-42787: Code Review Changes:
* Simplify the call to the query object
* Use id instead of object in query
* Change cast to string with .toString for StringBuilder

---
M src/org/openbravo/materialmgmt/ManageVariantsDS.java
---
(0116984)
dmiguelez   
2020-01-17 09:54   
Code Review + Testing Ok