Openbravo Issue Tracking System - POS2 | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0046828 | POS2 | POS | public | 2021-05-25 14:49 | 2021-07-30 09:06 |
Reporter | AugustoMauch | ||||
Assigned To | agonzalez | ||||
Priority | normal | Severity | major | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Platform | OS | 5 | OS Version | ||
Product Version | |||||
Target Version | Fixed in Version | ||||
Merge Request Status | |||||
Review Assigned To | |||||
OBNetwork customer | |||||
Support ticket | |||||
Regression level | |||||
Regression date | |||||
Regression introduced in release | |||||
Regression introduced by commit | |||||
Triggers an Emergency Pack | No | ||||
Summary | 0046828: With invalid configuration, wrong schema id can be set in the state | ||||
Description | Users can define at touchpoint level what it their default schema (entry in the Organization -> Schemas subtab). But not all schemas are loaded into the store, only those that complies with certain conditions (i.e. they reference a keymap). It the user selects as default a schema that does not reference a keymap, when the user logs in the wrong default schema id will be set in the state, because it will be the id of a schema not loaded in the store. | ||||
Steps To Reproduce | In the backoffice: - Add a new entry in the Organization -> Schema tab of the store of the touchpoint you will use later. Do not reference a keymap - In the touchpoint type of that touchpoint, select the schema created in the previous step as default In webpos: - After logging in, check that the schema id stored in the state (OB.App.State.getState().UI.currentSchemaId) is not one of the schemas available (OB.App.TerminalProperty.get('schemas')) This is the simpler way to check the bug. In an environment that have the Agapes integration module installed, it will not be possible to pay because an integration will fail. | ||||
Proposed Solution | - Add an event handler to prevent setting as default schema a schema that does not reference a keymap - In this function [1] return null if the default schema has not been loaded in the terminal - In this function [2] sort the schemas by their sequence number before returning the first one [1] https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/blob/aa78b0e536e1c7352557f6ea6b870844fdc35688/web-jspack/org.openbravo.pos2/src/configurations/keymapConfiguration/loadKeymapConfigurations.js#L91 [^] [2] https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/blob/aa78b0e536e1c7352557f6ea6b870844fdc35688/web-jspack/org.openbravo.pos2/src/configurations/keymapConfiguration/loadKeymapConfigurations.js#L87 [^] | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2021-05-25 14:49 | AugustoMauch | New Issue | |||
2021-05-25 14:49 | AugustoMauch | Assigned To | => Retail | ||
2021-05-25 14:49 | AugustoMauch | Triggers an Emergency Pack | => No | ||
2021-06-14 10:22 | guilleaer | Resolution time | => 1625349600 | ||
2021-06-14 10:22 | guilleaer | Status | new => scheduled | ||
2021-06-14 10:22 | guilleaer | Status | scheduled => acknowledged | ||
2021-07-14 13:20 | dmiguelez | Resolution time | 1625349600 => 1628028000 | ||
2021-07-27 15:51 | dmiguelez | Assigned To | Retail => agonzalez | ||
2021-07-27 20:10 | hgbot | Note Added: 0130813 | |||
2021-07-28 18:11 | hgbot | Note Added: 0130857 | |||
2021-07-30 09:06 | dmiguelez | Status | acknowledged => scheduled | ||
2021-07-30 09:06 | dmiguelez | Status | scheduled => resolved | ||
2021-07-30 09:06 | dmiguelez | Resolution | open => fixed | ||
2021-07-30 09:06 | dmiguelez | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|