Openbravo Issue Tracking System - POS2
View Issue Details
0049533POS2POSpublic2022-06-10 12:452022-06-16 11:38
timothee_catteeuw 
AugustoMauch 
normalmajorsometimes
closedfixed 
5
 
 
No
0049533: JIRA 3074 - After opening certain tickets in sales history, a blocking error appears (and clean cache needed to unblocked)
After opening a ticket in sales history, a blocking error appears.

It happens just for some tickets on test environment

On test environment those tickets allow displaying the error :

00690011/0000340

00690011/0000340-1
On webPOS

Go to sales history and select ticket mentionned as example before

→ KO this error appears and to be able to use my till again it is necessary to clean browser cache

react-dom.production.min.js:216 TypeError: e.startsWith is not a function
at d (I18N.js:56:12)
at a (useLabel.js:25:10)
at c (StandardProductConfigurationItem.jsx:19:17)
at ia (react-dom.production.min.js:157:137)
at $u (react-dom.production.min.js:267:460)
at Cl (react-dom.production.min.js:250:347)
at Sl (react-dom.production.min.js:250:278)
at Ol (react-dom.production.min.js:250:138)
at vl (react-dom.production.min.js:243:163)
at react-dom.production.min.js:123:115
uu @ react-dom.production.min.js:216
POS2.js:3702 e.startsWith is not a function; line: R (https://XXXXXX-fs-u18-test.cloud.openbravo.com/openbravo/web/pos/static/js/main.4126a984.chunk.js:1:75162 [^]) (*)
No tags attached.
related to feature request 0049584 new Retail Product modifiers should be moved to product.configuration.modifiers to allow deactivating them 
Issue History
2022-06-10 12:45timothee_catteeuwNew Issue
2022-06-10 12:45timothee_catteeuwAssigned To => Retail
2022-06-10 12:45timothee_catteeuwTriggers an Emergency Pack => No
2022-06-15 20:10AugustoMauchAssigned ToRetail => AugustoMauch
2022-06-15 20:10AugustoMauchStatusnew => scheduled
2022-06-15 20:23hgbotNote Added: 0138386
2022-06-16 11:38hgbotResolutionopen => fixed
2022-06-16 11:38hgbotStatusscheduled => closed
2022-06-16 11:38hgbotNote Added: 0138399
2022-06-16 11:38hgbotNote Added: 0138400
2022-06-16 13:58cbernerRelationship addedrelated to 0049584

Notes
(0138386)
hgbot   
2022-06-15 20:23   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1012 [^]
(0138399)
hgbot   
2022-06-16 11:38   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 5f01ef4422eaff29f18e541436033b7609dfc2d8
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 16-06-2022 09:38:33
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/5f01ef4422eaff29f18e541436033b7609dfc2d8 [^]

Fixes ISSUE-49533: Avoids error when loading order with inactive modifier

There were two problems when an order is loaded that contains modifiers that are not present in the
application master data:
- The wrong default renderer was being used. The modifier was rendered using the default renderStandardProductConfigurationItem renderer, when it should have been used getProductModifierItemRender. Now in order to decide the default renderer, getProductModifierItemRender will be used if the object key is an UUID. Currently product modifiers are the only ones that store properties in uuids in the configuration object so it work for now, but this will be simplified when
we store the modifiers configuration as properties of product.configuration.modifiers instead of directly under
product.configuration.
- getAvailableModifierGroups assumed all modifiers received as parameters were also present in the local database. This has been fixed by filtering out those who are not present.

---
M web-jspack/org.openbravo.pos2/src/components/Ticket/TicketLines/ProductConfiguration.jsx
M web-jspack/org.openbravo.pos2/src/model/modifierGroup/getAvailableModifierGroups.js
---
(0138400)
hgbot   
2022-06-16 11:38   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1012 [^]