Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0042786Openbravo ERP02. Master data managementpublic2020-01-10 06:392020-01-21 10:55
AtulOpenbravo 
AtulOpenbravo 
normalmajorhave not tried
closedfixed 
5
 
3.0PR20Q2 
dmiguelez
Core
No
0042786: Apply new HQL style in ProductCharacteristicsDS
1. Avoid use of StringBuilder use normal Strings.
2. HQL formatting is important for improving readability.
3. Avoid use of Property Constant if any
-
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:39AtulOpenbravoNew Issue
2020-01-10 06:39AtulOpenbravoAssigned To => AtulOpenbravo
2020-01-10 06:39AtulOpenbravoModules => Core
2020-01-10 06:39AtulOpenbravoTriggers an Emergency Pack => No
2020-01-10 06:39AtulOpenbravoIssue generated from0042785
2020-01-10 06:42AtulOpenbravoRelationship addedrelated to 0041287
2020-01-10 06:44AtulOpenbravoIssue cloned0042787
2020-01-10 06:47AtulOpenbravoIssue cloned0042788
2020-01-14 10:59AtulOpenbravoStatusnew => scheduled
2020-01-14 10:59AtulOpenbravoNote Added: 0116833
2020-01-21 10:55hgbotCheckin
2020-01-21 10:55hgbotNote Added: 0117121
2020-01-21 10:55hgbotStatusscheduled => resolved
2020-01-21 10:55hgbotResolutionopen => fixed
2020-01-21 10:55hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/0115ed1dc5321f581a71126692e13cf16f6a7881 [^]
2020-01-21 10:55hgbotCheckin
2020-01-21 10:55hgbotNote Added: 0117122
2020-01-21 10:55hgbotCheckin
2020-01-21 10:55hgbotNote Added: 0117123
2020-01-21 10:55dmiguelezReview Assigned To => dmiguelez
2020-01-21 10:55dmiguelezNote Added: 0117124
2020-01-21 10:55dmiguelezStatusresolved => closed
2020-01-21 10:55dmiguelezFixed in Version => 3.0PR20Q2

Notes
(0116833)
AtulOpenbravo   
2020-01-14 10:59   
Test Plan
- Define a Product Characteristics, set Variant = Yes, Explode Configuration Tab = Yes
- Add records in Value Tab (two different records)
- Add record in Subset Tab (one subset)
- Add records in Subset value Tab (two different records)
- Create a Generic Product
- Add above Characteristics defined in Product Window Characteristics Tab.
- Run Create Variants process.
- Realize that 2 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.
- Add Sales Price List to Variant Products created.
- Create a Sales Order for any business partner and the Price List in which above created Variant products are created.
- In Line, click on Product Selector, realize that Variant Product are shown in P&E window, with Characteristic Description.
- Click on Characteristic Filter, realize that tree structure is properly shown.
(0117121)
hgbot   
2020-01-21 10:55   
Repository: erp/devel/pi
Changeset: 0115ed1dc5321f581a71126692e13cf16f6a7881
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Tue Jan 14 13:28:21 2020 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/0115ed1dc5321f581a71126692e13cf16f6a7881 [^]

Fixes BUG-42786:Apply new HQL style in ProductCharacteristicsDS

**Avoided use of StringBuilder for hql query strings, use String
instead, readability is improved.
**To avoid sql injection modified private method getClientOrgFilter()
to getOrgFilter() inorder to set as a ParameterList to Query,
added client parameter in the getAllNodes() method itself.

---
M src/org/openbravo/materialmgmt/ProductCharacteristicsDS.java
---
(0117122)
hgbot   
2020-01-21 10:55   
Repository: erp/devel/pi
Changeset: f806bfb22a170798010cd1b071c41df7919eeca4
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Tue Jan 14 14:21:35 2020 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/f806bfb22a170798010cd1b071c41df7919eeca4 [^]

Related To ISSUE-42786:Apply HQL style in ProductCharacteristicsDS,
apply SonarLint suggestions

**Modifiers to declared in correct order.
**Throwable should not be caught.
**Remove unnecessary null check, "instanceof" returns false for
nulls.
**Use not isEmpty() instead of size() > 0 for missingNodes Set.

---
M src/org/openbravo/materialmgmt/ProductCharacteristicsDS.java
---
(0117123)
hgbot   
2020-01-21 10:55   
Repository: erp/devel/pi
Changeset: b688a7cdf9e1c4e83d5785bd925339114c2aad3a
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Tue Jan 21 10:54:47 2020 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/b688a7cdf9e1c4e83d5785bd925339114c2aad3a [^]

Related to ISSUE-42786. Code Review changes:
* Simplify the call to the query object

---
M src/org/openbravo/materialmgmt/ProductCharacteristicsDS.java
---
(0117124)
dmiguelez   
2020-01-21 10:55   
Code Review + Testing Ok