Openbravo Issue Tracking System - POS2
View Issue Details
0046828POS2POSpublic2021-05-25 14:492021-07-30 09:06
normalmajorhave not tried
0046828: With invalid configuration, wrong schema id can be set in the state
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.
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.
- 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] [^]
[2] [^]
No tags attached.
Issue History
2021-05-25 14:49AugustoMauchNew Issue
2021-05-25 14:49AugustoMauchAssigned To => Retail
2021-05-25 14:49AugustoMauchTriggers an Emergency Pack => No
2021-06-14 10:22guilleaerResolution time => 1625349600
2021-06-14 10:22guilleaerStatusnew => scheduled
2021-06-14 10:22guilleaerStatusscheduled => acknowledged
2021-07-14 13:20dmiguelezResolution time1625349600 => 1628028000
2021-07-27 15:51dmiguelezAssigned ToRetail => agonzalez
2021-07-27 20:10hgbotNote Added: 0130813
2021-07-28 18:11hgbotNote Added: 0130857
2021-07-30 09:06dmiguelezStatusacknowledged => scheduled
2021-07-30 09:06dmiguelezStatusscheduled => resolved
2021-07-30 09:06dmiguelezResolutionopen => fixed
2021-07-30 09:06dmiguelezStatusresolved => closed

2021-07-27 20:10   
Merge Request created: [^]
2021-07-28 18:11   
Merge request merged: [^]