Openbravo Issue Tracking System - POS2
View Issue Details
0051496POS2POSpublic2023-01-27 08:472023-02-02 17:16
AugustoMauch 
AugustoMauch 
normalmajorhave not tried
closedfixed 
5
 
23Q123Q1 
No
0051496: 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.
blocks defect 0051477 closed AugustoMauch Errors when saving keymap editor changes if there are more than 300 records in a keymap 
Issue History
2023-01-30 11:11guilleaerTypedefect => backport
2023-01-30 11:11guilleaerTarget Version => 23Q1
2023-02-02 17:14hgbotNote Added: 0146185
2023-02-02 17:16hgbotResolutionopen => fixed
2023-02-02 17:16hgbotStatusscheduled => closed
2023-02-02 17:16hgbotNote Added: 0146186
2023-02-02 17:16hgbotFixed in Version => 23Q1
2023-02-02 17:16hgbotNote Added: 0146187

Notes
(0146185)
hgbot   
2023-02-02 17:14   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1503 [^]
(0146186)
hgbot   
2023-02-02 17:16   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1503 [^]
(0146187)
hgbot   
2023-02-02 17:16   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 6a7e59efe6f4db5de40f0bf04c33cd9de0ee5cf4
Author: Guillermo Alvarez de Eulate <guillermo.alvarez@openbravo.com>
Date: 02-02-2023 17:13:07
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/6a7e59efe6f4db5de40f0bf04c33cd9de0ee5cf4 [^]

fixed ISSUE-51496: Increases the limit of supported keymap products of a keymap version

---
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
---