Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0042879Openbravo ERP02. Master data managementpublic2020-01-15 09:452020-01-21 13:45
AtulOpenbravo 
AtulOpenbravo 
normaltrivialhave not tried
closedfixed 
5
 
3.0PR20Q2 
dmiguelez
Core
No
0042879: Apply new HQL style in ProductServiceConfigurationObserver
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 platform Tracking issue: Convert HQL to apply new style 
Issue History
2020-01-15 09:45AtulOpenbravoNew Issue
2020-01-15 09:45AtulOpenbravoAssigned To => AtulOpenbravo
2020-01-15 09:45AtulOpenbravoModules => Core
2020-01-15 09:45AtulOpenbravoTriggers an Emergency Pack => No
2020-01-15 09:45AtulOpenbravoIssue generated from0042789
2020-01-15 09:46AtulOpenbravoRelationship addedrelated to 0041287
2020-01-16 03:53AtulOpenbravoStatusnew => scheduled
2020-01-16 03:53AtulOpenbravoNote Added: 0116914
2020-01-21 13:44hgbotCheckin
2020-01-21 13:44hgbotNote Added: 0117148
2020-01-21 13:44hgbotStatusscheduled => resolved
2020-01-21 13:44hgbotResolutionopen => fixed
2020-01-21 13:44hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/8c6c8e505183c1b55da35ccc5aed250274110c46 [^]
2020-01-21 13:44hgbotCheckin
2020-01-21 13:44hgbotNote Added: 0117149
2020-01-21 13:44hgbotCheckin
2020-01-21 13:44hgbotNote Added: 0117150
2020-01-21 13:45dmiguelezReview Assigned To => dmiguelez
2020-01-21 13:45dmiguelezNote Added: 0117151
2020-01-21 13:45dmiguelezStatusresolved => closed
2020-01-21 13:45dmiguelezFixed in Version => 3.0PR20Q2

Notes
(0116914)
AtulOpenbravo   
2020-01-16 03:53   
Test Plan
Note: All records are created in F&B US, Inc. Organization
- Navigate to Service Price Rule window
- Create record: Name - Test Range, Rule Type: Range
- Under Ranges tab create two records 1. Amount Upto 10000, Percentage: 10, 2. Amount Upto 100000, Percentage: 20
- Create record: Name - Test Percentage, Rule Type: Percentage, Percentage = 10
- Define Three Service product, Type as:Service
- Set Linked To Product = Yes, Include Product Categories: blank, Include Products : Only those Defined, Quantity Rule: As per Product, Allow Deferred Sell = Yes
- For Service Product 1 set Is Price Rule Based = No,
- For Service Product 2 & 3 set Is Price Rule Based = Yes.
- Add Sales Price in Price Tab for both products.
- For Service Product 2 - Add Service Price Rule as Test Range
- For Service Product 3 - Add Service Price Rule as Test Percentage
- Relate Products (For eg: Cherry Cola) to all Service Products created in above steps.
- For Related Products in Service Products based on Price Rule add respective Service Price Rules in Product Price Rule Version Tab.
- Create a Sales Order for any Business Partner
- Add service products 1, 2, & 3 created in the above steps
- Select the Service Product 1 Line, realize that Select Order Line button is visible
- Click on it and Clear filters in that P&E window, Sales Order Lines for product Cherry Cola appears in the list
- Select the Service Product 2 Line, realize that Select Order Line button is visible
- Click on it and Clear filters in that P&E window, Sales Order Lines for product Cherry Cola appears in the list
- Select the Service Product 3 Line, realize that Select Order Line button is visible
- Click on it and Clear filters in that P&E window, Sales Order Lines for product Cherry Cola appears in the list
- Select the records, try to edit Relate Quantity.
- Press Done button, realize that process is successful.
- Complete the Order.
- Navigate to Goods Shipment
- Create a Partial Shipment for each Sales Order Line in the above Sales Order created.
  For eg: Use 50% of Ordered Quantity in Shipment Lines.
- Complete the System.
- Navigate to any one of the Service Product 2 or 3, try to edit Quantity Rule.
- Realize that Error message is shown as: "Saving failed. Service configuration can not be changed as there is at least one order line pending to be delivered. (Example Order: 1000300)
"
(0117148)
hgbot   
2020-01-21 13:44   
Repository: erp/devel/pi
Changeset: 8c6c8e505183c1b55da35ccc5aed250274110c46
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Fri Jan 17 09:31:57 2020 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/8c6c8e505183c1b55da35ccc5aed250274110c46 [^]

Fixes BUG-42879: Apply new HQL style in
ProductServiceConfigurationObserver

**Avoid StringBuilder, use Strings for hql queries, formatter off
on to improve readability.
**Avoid use of Property Constants

---
M src/org/openbravo/event/ProductServiceConfigurationObserver.java
---
(0117149)
hgbot   
2020-01-21 13:44   
Repository: erp/devel/pi
Changeset: 4b54c2f66cb0f559e7515776fb253d88ee285fb0
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Fri Jan 17 09:35:25 2020 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/4b54c2f66cb0f559e7515776fb253d88ee285fb0 [^]

Related To ISSUE-42879: Apply new HQL style in
ProductServiceConfigurationObserver

**Applied SonarLint suggestions to use equals() method instead of
!= when comparing Boolean Object
**Simplied call to query object

---
M src/org/openbravo/event/ProductServiceConfigurationObserver.java
---
(0117150)
hgbot   
2020-01-21 13:44   
Repository: erp/devel/pi
Changeset: 5ab3c9946be6d5b4c6be3e044418540516c8990a
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Tue Jan 21 13:44:08 2020 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/5ab3c9946be6d5b4c6be3e044418540516c8990a [^]

Related to ISSUE-42879. Code Review Changes:
* Use id instead of object in query

---
M src/org/openbravo/event/ProductServiceConfigurationObserver.java
---
(0117151)
dmiguelez   
2020-01-21 13:45   
Code Review + Testing Ok