Openbravo Issue Tracking System - POS2
View Issue Details
0051477POS2POSpublic2023-01-27 08:472023-01-30 11:11
AugustoMauch 
AugustoMauch 
normalmajorhave not tried
closedfixed 
5
 
 
No
0051477: Errors when saving keymap editor changes if there are more than 300 records in a keymap
When saving the changes on a keymap layout, there is some code that checks if it needs to create new instances of Keymap models by comparing the data stored in memory with the data returned by a IndexedDB query (i.e. https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/blob/master/web-jspack/org.openbravo.pos2/src/components/KeyMapEditor/steps/KeyMapEditorLayout/utils/prepareKeymapVersionForSaving.js#L126 [^]).

The problem is that those queries do not specify a limit, so a default limit is set to 300. In that case, the system will think that it needs to create some new records because it mistakenly thinks that they do not exist yet, when the real problem is that they were not returned by the query because of the size limit
- Create a keymap version that has more than 300 manual products among all its keymap categories
- Open that keymap in the Keymap Editor window in POS2.
- Select its version and go to the edit layout screen
- Make any change (update the position of a product, change a color, etc)
- Save. There will be an Error While Importing in the backend, complaining about some constraint not being met
No tags attached.
depends on backport 005149623Q1 closed AugustoMauch Errors when saving keymap editor changes if there are more than 300 records in a keymap 
Issue History
2023-01-27 08:47AugustoMauchNew Issue
2023-01-27 08:47AugustoMauchAssigned To => AugustoMauch
2023-01-27 08:47AugustoMauchTriggers an Emergency Pack => No
2023-01-27 11:51hgbotNote Added: 0145931
2023-01-27 14:41hgbotResolutionopen => fixed
2023-01-27 14:41hgbotStatusnew => closed
2023-01-27 14:41hgbotFixed in Version => 23Q2
2023-01-27 14:41hgbotNote Added: 0145940
2023-01-27 14:41hgbotNote Added: 0145941
2023-01-29 19:09guilleaerNote Added: 0145977
2023-01-30 11:11guilleaerStatusclosed => new
2023-01-30 11:11guilleaerResolutionfixed => open
2023-01-30 11:11guilleaerFixed in Version23Q2 =>
2023-01-30 11:11guilleaerStatusnew => scheduled
2023-01-30 11:11guilleaerStatusscheduled => resolved
2023-01-30 11:11guilleaerResolutionopen => fixed
2023-01-30 11:11guilleaerStatusresolved => closed

Notes
(0145931)
hgbot   
2023-01-27 11:51   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1485 [^]
(0145940)
hgbot   
2023-01-27 14:41   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 1f9f65b1f43f7d85f4d6b3f2a6aaf5449750e8a5
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 27-01-2023 11:51:15
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/1f9f65b1f43f7d85f4d6b3f2a6aaf5449750e8a5 [^]

Fixes ISSUE-51477: Increases the limit of supported keymap products of a keymap version

Before this change there was a implicit limit on the number of supported keymap products, set to 300. This limit was not intented, we are
defining now a higher limit, that we could modify later on when we do further load tests

---
A web-jspack/org.openbravo.pos2/src/components/KeyMapEditor/steps/KeyMapEditorLayout/utils/getMasterdataModelBy.js
M web-jspack/org.openbravo.pos2/src/components/KeyMapEditor/steps/KeyMapEditorLayout/utils/prepareKeymapCategoryForSaving.js
M web-jspack/org.openbravo.pos2/src/components/KeyMapEditor/steps/KeyMapEditorLayout/utils/prepareKeymapProductsForSaving.js
M web-jspack/org.openbravo.pos2/src/components/KeyMapEditor/steps/KeyMapEditorLayout/utils/prepareKeymapVersionForSaving.js
---
(0145941)
hgbot   
2023-01-27 14:41   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1485 [^]
(0145977)
guilleaer   
2023-01-29 19:09   
Backport for 23Q1 is required