Openbravo Issue Tracking System - POS2
View Issue Details
0056938POS2POSpublic2024-10-30 14:442024-11-20 10:59
sofidossant 
fofarril 
highmajoralways
closedfixed 
5
24Q3.2 
25Q1 
approved
Gold
112501
No
0056938: Error when there are more than 300 Sales Representative Users
When we have for example 350 representative users, we cannot search correctly for certain users, because it does not find them by the limit.
1 - Create 350 Sales Representative Users in backoffice.
2 - Search for a user but with names beginning with the last letters of the alphabet.

You can't find the user, but if you check it is loaded in the cache
Code harcode with 300
https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/blob/release/24Q3/web/org.openbravo.mobile.core/app/model/persistence/indexeddb/Criteria.js?ref_type=heads&blame=1 [^]

commit https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/0d54d001c0ca49dfcde55c545030363974e9b694 [^]

(function CriteriaDefinition() {
  const DEFAULT_QUERY_LIMIT = 300;
  /**
   * Allows to create a criteria for searching objects using the IndexedDBController API.
   */
  OB.App.Class.Criteria = class Criteria {
    constructor() {
      this.theLimit = DEFAULT_QUERY_LIMIT;
      this.theOperator = 'and';
      this.order = { properties: [], directions: [] };
      this.properties = [];
      this.selectProperties = [];
    }

No tags attached.
depends on backport 005717024Q4 closed fofarril Error when there are more than 300 Sales Representative Users 
depends on backport 005717124Q3.3 closed fofarril Error when there are more than 300 Sales Representative Users 
depends on backport 005717224Q2.5 closed fofarril Error when there are more than 300 Sales Representative Users 
Issue History
2024-10-30 14:44sofidossantNew Issue
2024-10-30 14:44sofidossantAssigned To => Retail
2024-10-30 14:44sofidossantOBNetwork customer => Gold
2024-10-30 14:44sofidossantSupport ticket => 112501
2024-10-30 14:44sofidossantTriggers an Emergency Pack => No
2024-11-05 15:01jorgewederagoAssigned ToRetail => jorgewederago
2024-11-05 15:01jorgewederagoStatusnew => acknowledged
2024-11-05 20:55fofarrilAssigned Tojorgewederago => fofarril
2024-11-05 21:30fofarrilStatusacknowledged => scheduled
2024-11-07 22:42hgbotMerge Request Status => open
2024-11-07 22:42hgbotNote Added: 0171660
2024-11-19 09:44jorgewederagoStatusscheduled => acknowledged
2024-11-19 09:44jorgewederagoStatusacknowledged => scheduled
2024-11-19 09:45hgbotMerge Request Statusopen => approved
2024-11-20 10:59hgbotNote Added: 0172313
2024-11-20 10:59hgbotResolutionopen => fixed
2024-11-20 10:59hgbotStatusscheduled => closed
2024-11-20 10:59hgbotFixed in Version => 25Q1
2024-11-20 10:59hgbotNote Added: 0172314

Notes
(0171660)
hgbot   
2024-11-07 22:42   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/3072 [^]
(0172313)
hgbot   
2024-11-20 10:59   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/3072 [^]
(0172314)
hgbot   
2024-11-20 10:59   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: f7bf7e8dd52932dd736f67b0476512e2dadf7830
Author: Francisco Javier Deler O'Farril <francisco.ofarril@doceleguas.com>
Date: 20-11-2024 09:59:26
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/f7bf7e8dd52932dd736f67b0476512e2dadf7830 [^]

Fixes ISSUE-56938: Error when there are more than 300 Sales Representative Users.

---
M web-jspack/org.openbravo.pos2/src/components/SalesRepSelector/SalesRepSelector.jsx
M web-jspack/org.openbravo.pos2/src/components/SalesRepSelector/SalesRepSelector.scss
M web-jspack/org.openbravo.pos2/src/components/SalesRepSelector/SalesRepSelectorDataSource.js
M web-jspack/org.openbravo.pos2/src/components/SalesRepSelector/SalesRepSelectorDialog/__test__/SalesRepSelectorDialog.test.jsx
M web-jspack/org.openbravo.pos2/src/components/SalesRepSelector/__test__/SalesRepSelector.test.jsx
---