Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0043462
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajoralways2020-03-09 17:092020-03-26 12:38
Reportersamuel_nicuesaView Statuspublic 
Assigned Torqueralta 
PriorityhighResolutionfixedFixed in VersionRR20Q2
StatusclosedFix in branchFixed in SCM revision65aaf8b03792
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned Tojorge-garcia
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0043462: The query to find Bags and Gift Card products in Self Checkout is too slow.

DescriptionThe query to find Bags and Gift Card products in Self Checkout is too slow.
We need to have installed this module org.openbravo.retail.selfcheckout
Steps To ReproduceThe first time we load product bags and gift card products the query takes a lot of time to return the results.

We need to include 2 Index in M_PRODUCT table

This code loads the M_Product bags :

if (OB.MobileApp.model.hasPermission('OBPOS_remote.product', true)) {

    criteria.remoteFilters = [{
        columns: ['obscoIsBag'],
        operator: 'equals',
        value: 'Y'
    }];
}
OB.Dal.findUsingCache('bagSearch', OB.Model.Product, criteria, function(data) {
            if (data.length > 0) {
                data.forEach(function(product) {
                            button = me.$.bagsArea.createComponent({

And this code loads the Gift Card products


 OB.UI.GiftCardUtils.service(
      'org.openbravo.retail.giftcards.CancelGiftCard',
      {
        giftcard: card,
        _tryCentralFromStore: true,
        _executeInOneServer: true
      },
      function(result) {
        OB.UI.GiftCardUtils.findProductModel(result.product.id, function(
          transactionproduct
        ) {
Proposed SolutionAdd these 2 indexes in M_PRODUCT TABLE

 <index name="M_PRODUCT_IDX" unique="false">
 <index-column name="M_PRODUCT_ID"/>
 </index>

 <index name="EM_OBSCO_ISBAG_IDX" unique="false">
 <index-column name="EM_OBSCO_ISBAG"/>
 </index>
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0118813)
hgbot (developer)
2020-03-25 15:48

Repository: erp/pmods/org.openbravo.retail.selfcheckout
Changeset: 65aaf8b0379299123090ba158da2fa7f53ad3aa7
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Thu Mar 19 10:04:20 2020 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.selfcheckout/rev/65aaf8b0379299123090ba158da2fa7f53ad3aa7 [^]

Fixed BUG-43462: The query to find Bags and Gift Card products in Self Checkout
is too slow.

- Added a new index in m_product table

---
M src-db/database/model/modifiedTables/M_PRODUCT.xml
---
(0118832)
jorge-garcia (developer)
2020-03-26 12:38

Finally, the problem detected in giftcards was caused by a custom module implementation of Gift Cards in a client.

The code only affects to Bags products and it was tested and reviewed.

- Issue History
Date Modified Username Field Change
2020-03-09 17:09 samuel_nicuesa New Issue
2020-03-09 17:09 samuel_nicuesa Assigned To => Retail
2020-03-09 17:09 samuel_nicuesa Triggers an Emergency Pack => No
2020-03-18 00:13 rqueralta Assigned To Retail => rqueralta
2020-03-18 00:13 rqueralta Status new => scheduled
2020-03-25 15:48 hgbot Checkin
2020-03-25 15:48 hgbot Note Added: 0118813
2020-03-25 15:48 hgbot Status scheduled => resolved
2020-03-25 15:48 hgbot Resolution open => fixed
2020-03-25 15:48 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.selfcheckout/rev/65aaf8b0379299123090ba158da2fa7f53ad3aa7 [^]
2020-03-26 08:53 jorge-garcia Review Assigned To => jorge-garcia
2020-03-26 12:38 jorge-garcia Note Added: 0118832
2020-03-26 12:38 jorge-garcia Status resolved => closed
2020-03-26 12:38 jorge-garcia Fixed in Version => RR20Q2


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker