Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0042785Openbravo ERP02. Master data managementpublic2020-01-10 06:362020-01-17 09:14
AtulOpenbravo 
AtulOpenbravo 
normalminorhave not tried
closedfixed 
5
 
3.0PR20Q2 
dmiguelez
Core
No
0042785: Apply new HQL style in ProductCharacteristicEventHandler
1. Avoid use of StringBuilder use normal Strings.
2. HQL formatting is important for improving readability.
3. Avoid use of Property Constant for eg: CharacteristicValue.PROPERTY_ID, CharacteristicSubsetValue.PROPERTY_CODE, CharacteristicValue.PROPERTY_CODE, CharacteristicValue.PROPERTY_ACTIVE, CharacteristicSubsetValue.ENTITY_NAME etc
-
Follow new style available here http://wiki.openbravo.com/wiki/HQL_Coding_Conventions [^]
No tags attached.
depends on design defect 0041287 acknowledged Triage Platform Base Tracking issue: Convert HQL to apply new style 
Not all the children of this issue are yet resolved or closed.
Issue History
2020-01-10 06:36AtulOpenbravoNew Issue
2020-01-10 06:36AtulOpenbravoAssigned To => AtulOpenbravo
2020-01-10 06:36AtulOpenbravoModules => Core
2020-01-10 06:36AtulOpenbravoTriggers an Emergency Pack => No
2020-01-10 06:36AtulOpenbravoIssue generated from0042784
2020-01-10 06:36AtulOpenbravoRelationship addeddepends on 0041287
2020-01-10 06:39AtulOpenbravoIssue cloned0042786
2020-01-13 11:16AtulOpenbravoStatusnew => scheduled
2020-01-13 11:16AtulOpenbravoNote Added: 0116789
2020-01-17 09:13hgbotCheckin
2020-01-17 09:13hgbotNote Added: 0116971
2020-01-17 09:13hgbotStatusscheduled => resolved
2020-01-17 09:13hgbotResolutionopen => fixed
2020-01-17 09:13hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/7e4d4c644e645dee71409f32c306f0d05d4aee2a [^]
2020-01-17 09:13hgbotCheckin
2020-01-17 09:13hgbotNote Added: 0116972
2020-01-17 09:13hgbotCheckin
2020-01-17 09:13hgbotNote Added: 0116973
2020-01-17 09:13hgbotCheckin
2020-01-17 09:13hgbotNote Added: 0116974
2020-01-17 09:14dmiguelezReview Assigned To => dmiguelez
2020-01-17 09:14dmiguelezNote Added: 0116975
2020-01-17 09:14dmiguelezStatusresolved => closed
2020-01-17 09:14dmiguelezFixed in Version => 3.0PR20Q2

Notes
(0116789)
AtulOpenbravo   
2020-01-13 11:16   
- 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.
- Change Characteristic Subset or set/reset Explode Configuration Tab flag in the Product | Characteristic Tab
- Realize that Configuration tab records are updated accordingly as per the selected Subset.
(0116971)
hgbot   
2020-01-17 09:13   
Repository: erp/devel/pi
Changeset: 7e4d4c644e645dee71409f32c306f0d05d4aee2a
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Mon Jan 13 14:28:59 2020 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/7e4d4c644e645dee71409f32c306f0d05d4aee2a [^]

Fixes BUG-42785: Apply new HQL style in ProductCharacteristicEventHandler

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

---
M src/org/openbravo/event/ProductCharacteristicEventHandler.java
---
(0116972)
hgbot   
2020-01-17 09:13   
Repository: erp/devel/pi
Changeset: d31807c76410f3076c403fbbc764dfe239104990
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Mon Jan 13 14:45:25 2020 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/d31807c76410f3076c403fbbc764dfe239104990 [^]

Related To ISSUE-42785:Apply new HQL style in ProductCharacteristicEventHandler

**Applied changes as per Sonar Lint Report

---
M src/org/openbravo/event/ProductCharacteristicEventHandler.java
---
(0116973)
hgbot   
2020-01-17 09:13   
Repository: erp/devel/pi
Changeset: fb750c2e1d3a48f6c034f09e91e8ae50b8652803
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Tue Jan 14 07:53:46 2020 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/fb750c2e1d3a48f6c034f09e91e8ae50b8652803 [^]

Related To ISSUE-42785:Apply new HQL formatting/style in
ProductCharacteristicEventHandler

**Revert changes related to SonarLint suggestion to use
Boolean.TRUE.equals in if loop condition check.

---
M src/org/openbravo/event/ProductCharacteristicEventHandler.java
---
(0116974)
hgbot   
2020-01-17 09:13   
Repository: erp/devel/pi
Changeset: 5d9524a3229c19cda6580760b46b05dac6b2e26b
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Fri Jan 17 09:12:52 2020 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/5d9524a3229c19cda6580760b46b05dac6b2e26b [^]

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

---
M src/org/openbravo/event/ProductCharacteristicEventHandler.java
---
(0116975)
dmiguelez   
2020-01-17 09:14   
Code Review + Testing Ok