Openbravo Issue Tracking System - Retail Modules
View Issue Details
0051509Retail ModulesWeb POSpublic2023-01-30 17:302023-02-13 08:07
sofidossant 
ranjith_qualiantech_com 
urgentmajoralways
closedfixed 
5
pi 
RR23Q2 
No
0051509: Business Partner stuck in Errors While Importing due to "violates unique constraint "ad_user_un_username"" error
Relation https://issues.openbravo.com/view.php?id=38108 [^]

The solution for this problem 38108 in the JAVA CustomerLoader
It has a for, with a limit of 10000 and in NORAUTO we have already passed to 10000.
for (int i = 0; i < 10000; i++) {
        final OBCriteria<org.openbravo.model.ad.access.User> userCriteria = OBDal.getInstance()
            .createCriteria(org.openbravo.model.ad.access.User.class);
        userCriteria.add(Restrictions.eq("username", possibleUsername));

this generates the error and we cannot save the business partners, and we have already reached 10000 with the same name.

openbravo=> select * from aD_user where username ilike '%. ._%' limit 10;
openbravo=> select count(*) from aD_user where username ilike '%. ._%';
  count
-------
 10429
(1 row)



1- Do 10000 users with the same name
2- When you do the 10001 user with the same name, we have a ewi with null pointer

add a preference with the number for the FOR
No tags attached.
Issue History
2023-01-30 17:30sofidossantNew Issue
2023-01-30 17:30sofidossantAssigned To => ranjith_qualiantech_com
2023-01-30 17:30sofidossantTriggers an Emergency Pack => No
2023-01-31 11:57ranjith_qualiantech_comStatusnew => scheduled
2023-02-03 07:48hgbotNote Added: 0146202
2023-02-03 07:48hgbotNote Added: 0146203
2023-02-13 08:07hgbotResolutionopen => fixed
2023-02-13 08:07hgbotStatusscheduled => closed
2023-02-13 08:07hgbotNote Added: 0146411
2023-02-13 08:07hgbotFixed in Version => RR23Q2
2023-02-13 08:07hgbotNote Added: 0146412
2023-02-13 08:07hgbotNote Added: 0146413
2023-02-13 08:07hgbotNote Added: 0146414

Notes
(0146202)
hgbot   
2023-02-03 07:48   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1056 [^]
(0146203)
hgbot   
2023-02-03 07:48   
Merge Request created: https://gitlab.com/openbravo/ci/mobile-test/-/merge_requests/263 [^]
(0146411)
hgbot   
2023-02-13 08:07   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1056 [^]
(0146412)
hgbot   
2023-02-13 08:07   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: fbd73ffbfb5fe1b30c628ea1feda489c9f6f6d84
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 13-02-2023 07:07:15
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/fbd73ffbfb5fe1b30c628ea1feda489c9f6f6d84 [^]

Fixed ISSUE-51509: SearchKey should be update with AlphaNumeric instead of number
* When adding customer and search is duplicate, then
  searchKwy should be appened with 5characters of AlphaNumeric

---
M src/org/openbravo/retail/posterminal/CustomerLoader.java
---
(0146413)
hgbot   
2023-02-13 08:07   
Repository: https://gitlab.com/openbravo/ci/mobile-test [^]
Changeset: 7c94f8d64d01279bc4887199379147c47430bd67
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 13-02-2023 07:07:39
URL: https://gitlab.com/openbravo/ci/mobile-test/-/commit/7c94f8d64d01279bc4887199379147c47430bd67 [^]

Related to ISSUE-51509: Updated test I34168_verifyCustomerNameLength

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/I34168_verifyCustomerNameLength.java
---
(0146414)
hgbot   
2023-02-13 08:07   
Merge request merged: https://gitlab.com/openbravo/ci/mobile-test/-/merge_requests/263 [^]