Openbravo Issue Tracking System - Retail Modules
View Issue Details
0036175Retail ModulesWeb POSpublic2017-06-05 11:302017-12-13 11:33
egoitz 
ebecerra 
normalmajoralways
closedfixed 
5
 
RR17Q4 
marvintm
No
0036175: Perforamnce problems loading the master data for discounts.
On environment with a lot of product characteristics, the load of the
DiscountFiltercharactaritic model takes long.
-Login on webpos on an environment with a big amount of characteristics
*The query of the DiscountFiltercharactaritic model takes long.
ON modules/org.openbravo.retail.posterminal/src/org/openbravo/retail/posterminal/master/DiscountFilterCharacteristic.java
replace
hql += " left join c.characteristic.productCharacteristicValueList cvl ";
with
hql += " left join c.characteristic.characteristicValueList cvl ";

and
hql += " and m_isparent_ch_value(cvl.characteristicValue.id, c.chValue.id, c.characteristic.id) != -1 ";
with
 hql += " and m_isparent_ch_value(cvl.id, c.chValue.id, c.characteristic.id) != -1 ";


Also edit the file
modules/org.openbravo.retail.posterminal/src/org/openbravo/retail/posterminal/master/DiscountFilterCharacteristicProperties.java
by replacing
add(new HQLProperty("distinct(coalesce(c.id,cvl.characteristicValue.id))", "id"));
with
add(new HQLProperty("distinct(coalesce(c.id,cvl.id))", "id"));

and
add(new HQLProperty("cvl.characteristicValue.id", "chValue"));
with
add(new HQLProperty("cvl.id", "chValue"));
Performance
depends on backport 0036426RR17Q3 closed ebecerra Perforamnce problems loading the master data for discounts. 
depends on backport 0036427RR17Q2.2 closed ebecerra Perforamnce problems loading the master data for discounts. 
depends on backport 0036428RR17Q1.3 closed ebecerra Perforamnce problems loading the master data for discounts. 
related to defect 0050860 closed ranjith_qualiantech_com Query for retrieving the Discount Filter Characteristics take too long 
Issue History
2017-06-05 11:30egoitzNew Issue
2017-06-05 11:30egoitzAssigned To => Retail
2017-06-05 11:30egoitzResolution time => 1497909600
2017-06-05 11:30egoitzTriggers an Emergency Pack => No
2017-06-26 08:40marvintmResolution time1497909600 => 1499637600
2017-06-29 10:32marvintmProposed Solution updated
2017-07-04 13:14hgbotCheckin
2017-07-04 13:14hgbotNote Added: 0097836
2017-07-04 13:14hgbotStatusnew => resolved
2017-07-04 13:14hgbotResolutionopen => fixed
2017-07-04 13:14hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/31e4ae9b1728a4afcccb7c391392124513dcdb2f [^]
2017-07-06 08:46marvintmAssigned ToRetail => ebecerra
2017-07-06 08:46marvintmStatusresolved => new
2017-07-06 08:46marvintmResolutionfixed => open
2017-07-06 08:47marvintmStatusnew => scheduled
2017-07-06 08:47marvintmStatusscheduled => resolved
2017-07-06 08:47marvintmFixed in Version => RR17Q4
2017-07-06 08:47marvintmResolutionopen => fixed
2017-07-07 09:16marvintmReview Assigned To => marvintm
2017-07-07 09:16marvintmStatusresolved => closed
2017-12-13 11:33malsasuaTag Attached: Performance
2022-11-11 13:08ngarciaRelationship addedrelated to 0050860

Notes
(0097836)
hgbot   
2017-07-04 13:14   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 31e4ae9b1728a4afcccb7c391392124513dcdb2f
Author: Eduardo Becerra <ebec70 <at> yahoo.com>
Date: Thu Jun 29 12:32:14 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/31e4ae9b1728a4afcccb7c391392124513dcdb2f [^]

Fixed issue 36175: Optimize loading the master data for discounts

---
M src/org/openbravo/retail/posterminal/master/DiscountFilterCharacteristic.java
M src/org/openbravo/retail/posterminal/master/DiscountFilterCharacteristicProperties.java
---