Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0046828
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[POS2] POSmajorhave not tried2021-05-25 14:492021-07-30 09:06
ReporterAugustoMauchView Statuspublic 
Assigned Toagonzalez 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0046828: With invalid configuration, wrong schema id can be set in the state

DescriptionUsers 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 ReproduceIn 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 [^]
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0130813)
hgbot (developer)
2021-07-27 20:10

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/638 [^]
(0130857)
hgbot (developer)
2021-07-28 18:11

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/638 [^]

- 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


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker