Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0042784Openbravo ERP02. Master data managementpublic2020-01-10 06:322020-01-16 17:13
AtulOpenbravo 
AtulOpenbravo 
normaltrivialhave not tried
closedfixed 
5
 
3.0PR20Q2 
dmiguelez
Core
No
0042784: Apply new HQL style in CharacteristicValueEventHandler
1. Avoid use of StringBuilder use normal Strings.
2. HQL formatting is important for improving readability.
-
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:32AtulOpenbravoNew Issue
2020-01-10 06:32AtulOpenbravoAssigned To => AtulOpenbravo
2020-01-10 06:32AtulOpenbravoModules => Core
2020-01-10 06:32AtulOpenbravoTriggers an Emergency Pack => No
2020-01-10 06:32AtulOpenbravoIssue generated from0042740
2020-01-10 06:33AtulOpenbravoRelationship addedrelated to 0041287
2020-01-10 06:36AtulOpenbravoIssue cloned0042785
2020-01-13 11:16AtulOpenbravoStatusnew => scheduled
2020-01-13 11:16AtulOpenbravoNote Added: 0116790
2020-01-16 17:13hgbotCheckin
2020-01-16 17:13hgbotNote Added: 0116943
2020-01-16 17:13hgbotStatusscheduled => resolved
2020-01-16 17:13hgbotResolutionopen => fixed
2020-01-16 17:13hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/e4c208a269ae144b8a04f55c7703393d86f41ab7 [^]
2020-01-16 17:13hgbotCheckin
2020-01-16 17:13hgbotNote Added: 0116944
2020-01-16 17:13hgbotCheckin
2020-01-16 17:13hgbotNote Added: 0116945
2020-01-16 17:13dmiguelezReview Assigned To => dmiguelez
2020-01-16 17:13dmiguelezNote Added: 0116946
2020-01-16 17:13dmiguelezStatusresolved => closed
2020-01-16 17:13dmiguelezFixed in Version => 3.0PR20Q2

Notes
(0116790)
AtulOpenbravo   
2020-01-13 11:16   
Characteristic Event Handler

- 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.
- Realize that process are successful.
- Go to Value Tab in Product Characteristics Window.
- Change the Code of any Value record.
- Save the record.
- Realize that Code is modified accordingly in the Product Window | Characteristics | Characteristic Configuration Tab
(0116943)
hgbot   
2020-01-16 17:13   
Repository: erp/devel/pi
Changeset: e4c208a269ae144b8a04f55c7703393d86f41ab7
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Mon Jan 13 14:23:11 2020 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/e4c208a269ae144b8a04f55c7703393d86f41ab7 [^]

Fixes BUG-42784: Apply new HQL style in CharacteristicValueEventHandler

**Applied new HQL style, removed use of StringBuilder

---
M src/org/openbravo/event/CharacteristicValueEventHandler.java
---
(0116944)
hgbot   
2020-01-16 17:13   
Repository: erp/devel/pi
Changeset: c449b2991a44ae6e0b03df49c01c6f17f3b987f8
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Tue Jan 14 07:50:35 2020 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/c449b2991a44ae6e0b03df49c01c6f17f3b987f8 [^]

Related To ISSUE-42784:Apply new HQL style in CharacteristicValueEventHandler

**Applied SonarLint suggesstion
**Avoid try catch nesting to improve readability and understand well which
block will catch which exception.
*ThreadLocal variables should be cleaned up when no longer used, calling
set(null) to remove the value might keep the reference to this pointer in
the map, which can cause memory leak in some scenarios. Using remove()
is safer to avoid this issue.

---
M src/org/openbravo/event/CharacteristicValueEventHandler.java
---
(0116945)
hgbot   
2020-01-16 17:13   
Repository: erp/devel/pi
Changeset: 7fba53bcd24fdf54a292d8abc9a1a0dea57408f0
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Thu Jan 16 17:13:15 2020 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/7fba53bcd24fdf54a292d8abc9a1a0dea57408f0 [^]

Related to ISSUE-42784: Code Review Changes:
  * Simplify the call to the query object
  * Use id instead of object in query

---
M src/org/openbravo/event/CharacteristicValueEventHandler.java
---
(0116946)
dmiguelez   
2020-01-16 17:13   
Code Review + Testing Ok