Openbravo Issue Tracking System - Retail Modules
View Issue Details
0043288Retail ModulesWeb POSpublic2020-02-20 19:042020-03-23 08:38
marvintm 
marvintm 
normalmajorhave not tried
closedfixed 
5
 
RR20Q2 
marvintm
No
0043288: Implement StateController and SynchronizationBuffer components using IndexedDB
New components to store the application state and the transactional messages that need to be synchronized to the application have been developed.

These components use IndexedDB as persistent storage technology, and are designed to be independent from existing UI components, and easier to test automatically.

The developer documentation for this feature can be found here:

http://wiki.openbravo.com/wiki/StateController [^]
.
No tags attached.
related to defect 0043507 closed caristu Remove winston npm dependency from mobile.core 
related to defect 0043290 new Retail indexeddb-state: disable some tests for merge 
related to design defect 0043536 closed alostale restructure JavaScript utilities file layout 
related to design defect 0045732 closed gorka_gil Extract from Terminal Log actions the code dependent of enyo 
causes defect 0043535 closed alostale console warn when loading WebPOS 
Issue History
2020-02-20 19:04marvintmNew Issue
2020-02-20 19:04marvintmAssigned To => Retail
2020-02-20 19:04marvintmTriggers an Emergency Pack => No
2020-02-20 21:58hgbotCheckin
2020-02-20 21:58hgbotNote Added: 0117990
2020-02-20 21:58hgbotStatusnew => resolved
2020-02-20 21:58hgbotResolutionopen => fixed
2020-02-20 21:58hgbotFixed in SCM revision => http://code.openbravo.com/tools/automation/pi-mobile/rev/2bd68b5f54e0aa17bb27ee04a8e3c1d7b7edd053 [^]
2020-02-20 21:59hgbotCheckin
2020-02-20 21:59hgbotNote Added: 0117991
2020-02-20 21:59hgbotFixed in SCM revisionhttp://code.openbravo.com/tools/automation/pi-mobile/rev/2bd68b5f54e0aa17bb27ee04a8e3c1d7b7edd053 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/4ac858f65e335c882caa48fc897a7b2229ff949a [^]
2020-02-21 11:26gorka_gilNote Added: 0118006
2020-02-21 12:04marvintmAssigned ToRetail => marvintm
2020-02-21 13:29hgbotCheckin
2020-02-21 13:29hgbotNote Added: 0118019
2020-02-21 13:29hgbotCheckin
2020-02-21 13:29hgbotNote Added: 0118020
2020-02-24 11:50hgbotCheckin
2020-02-24 11:50hgbotNote Added: 0118043
2020-02-24 13:36jarmendarizRelationship addedrelated to 0043290
2020-02-25 09:21hgbotCheckin
2020-02-25 09:21hgbotNote Added: 0118074
2020-02-25 19:18hgbotCheckin
2020-02-25 19:18hgbotNote Added: 0118105
2020-02-26 18:09hgbotCheckin
2020-02-26 18:09hgbotNote Added: 0118128
2020-02-27 13:13hgbotCheckin
2020-02-27 13:13hgbotNote Added: 0118159
2020-03-12 13:15marvintmDescription Updatedbug_revision_view_page.php?rev_id=20549#r20549
2020-03-12 13:16marvintmReview Assigned To => marvintm
2020-03-12 13:16marvintmStatusresolved => closed
2020-03-12 13:16marvintmFixed in Version => RR20Q2
2020-03-23 07:40alostaleRelationship addedcauses 0043535
2020-03-23 08:13alostaleRelationship addedrelated to 0043536
2020-03-23 08:38alostaleRelationship addedrelated to 0043507
2021-01-14 14:08gorka_gilRelationship addedrelated to 0045732

Notes
(0117990)
hgbot   
2020-02-20 21:58   
Repository: tools/automation/pi-mobile
Changeset: 2bd68b5f54e0aa17bb27ee04a8e3c1d7b7edd053
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Thu Feb 20 21:57:47 2020 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/2bd68b5f54e0aa17bb27ee04a8e3c1d7b7edd053 [^]

[indexedDB-state] Fixed BUG-43288: merge to pi

---
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/sessions/openstoretill/I36052_VerifyMultiPaymentMethodWithInitialCountCash.java
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/sessions/openstoretill/I36968_VerifyOpenTillAfterCloseStore.java
M src-test/org/openbravo/test/mobile/retail/mobilecore/javascript/MobileCoreAPI.java
M src-test/org/openbravo/test/mobile/retail/mobilecore/javascript/SynchronizationMonitor.java
M src-test/org/openbravo/test/mobile/retail/mobilecore/selenium/terminals/MobileCoreTerminalHelper.java
M src-test/org/openbravo/test/mobile/retail/multiserver/selenium/terminals/WebPOSCentralOfflineTerminalHelper.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/offline/I37709_VerifyCustomerOnReload.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/offline/LoginOfflineUserInformation.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/system/AbsoluteDateTime.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/system/I36288_CheckLogClientLoad.java
R src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/system/I29277_LogClientCircular.java
---
(0117991)
hgbot   
2020-02-20 21:59   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 4ac858f65e335c882caa48fc897a7b2229ff949a
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Thu Feb 20 21:51:42 2020 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/4ac858f65e335c882caa48fc897a7b2229ff949a [^]

[indexedDB-state] Fixed BUG-43288: merge to pi

---
M .eslintignore
M legal/Licensing.txt
M src-db/database/sourcedata/AD_PREFERENCE.xml
M src-db/database/sourcedata/AD_REF_LIST.xml
M src-db/database/sourcedata/OBMOBC_SERVICES.xml
M src/org/openbravo/mobile/core/LibraryResource.java
M src/org/openbravo/mobile/core/MobileCoreComponentProvider.java
M src/org/openbravo/mobile/core/TerminalLogLoader.java
M web/org.openbravo.mobile.core/source/component/dialog/ob-modalitemstosync.js
M web/org.openbravo.mobile.core/source/component/dialog/ob-modalmodelstosync.js
M web/org.openbravo.mobile.core/source/component/legacy/ob-legacy.js
M web/org.openbravo.mobile.core/source/component/ob-commonbuttons.js
M web/org.openbravo.mobile.core/source/component/ob-terminal-component.js
M web/org.openbravo.mobile.core/source/data/ob-dal.js
M web/org.openbravo.mobile.core/source/data/ob-requestrouter.js
M web/org.openbravo.mobile.core/source/model/ob-pollingrequesthandler.js
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
M web/org.openbravo.mobile.core/source/offline/ob-fetch-manifest.js
M web/org.openbravo.mobile.core/source/utils/ob-debug.js
M web/org.openbravo.mobile.core/source/utils/ob-dom-extension.js
M web/org.openbravo.mobile.core/source/utils/ob-polling-utils.js
M web/org.openbravo.mobile.core/source/utils/ob-processcontroller.js
M web/org.openbravo.mobile.core/source/utils/ob-synchronization.js
M web/org.openbravo.mobile.core/source/utils/ob-testregistry.js
M web/org.openbravo.mobile.core/source/utils/ob-utilities.js
M web/org.openbravo.mobile.core/source/utils/terminal-log-sync-utils.js
A package.json
A web-test/base/adapter.js
A web-test/base/fake-redux.js
A web-test/base/log.js
A web-test/base/ob-app.js
A web-test/base/state-utils.js
A web-test/model/application-state/PersistenceChangeListenerManager.test.js
A web-test/model/application-state/State.test.js
A web-test/model/application-state/StateAPI.test.js
A web-test/model/application-state/StatePersistence.functional.test.js
A web-test/model/application-state/StatePersistence.test.js
A web-test/model/business-object/messages/Messages.test.js
A web-test/model/business-object/terminal-log/SetupTerminalLog.js
A web-test/model/business-object/terminal-log/TerminalLog-AddButtonClick-ActionPreparation.test.js
A web-test/model/business-object/terminal-log/TerminalLog-AddLog-ActionPreparation.test.js
A web-test/model/business-object/terminal-log/TerminalLog-AddProcess-ActionPreparation.test.js
A web-test/model/business-object/terminal-log/TerminalLog-Addkey-ActionPreparation.test.js
A web-test/model/business-object/terminal-log/TerminalLog-StateAction-AddLog.test.js
A web-test/model/business-object/terminal-log/TerminalLog-StateAction-AddProcess.test.js
A web-test/model/business-object/terminal-log/TerminalLog-StateAction-AddbuttonClick.test.js
A web-test/model/business-object/terminal-log/TerminalLog-StateAction-Addkey.test.js
A web-test/model/business-object/terminal-log/TerminalLog.test.js
A web-test/model/persistence/indexeddb/IndexedDBController.test.js
A web-test/model/persistence/indexeddb/models.js
A web-test/model/synchronization-buffer/SynchronizationBuffer.test.js
A web-test/model/utils/ArrayUtils.test.js
A web/org.openbravo.mobile.core/app/.eslintrc.json
A web/org.openbravo.mobile.core/app/model/application-state/ActionCanceled.js
A web/org.openbravo.mobile.core/app/model/application-state/PersistenceChangeListenerManager.js
A web/org.openbravo.mobile.core/app/model/application-state/State.js
A web/org.openbravo.mobile.core/app/model/application-state/StateAPI.js
A web/org.openbravo.mobile.core/app/model/application-state/StatePersistence.js
A web/org.openbravo.mobile.core/app/model/business-object/messages/Messages.js
A web/org.openbravo.mobile.core/app/model/business-object/messages/MessagesUtils.js
A web/org.openbravo.mobile.core/app/model/business-object/terminal-log/TerminalLog.js
A web/org.openbravo.mobile.core/app/model/business-object/terminal-log/TerminalLogUtils.js
A web/org.openbravo.mobile.core/app/model/business-object/terminal-log/actions/AddButtonClick.js
A web/org.openbravo.mobile.core/app/model/business-object/terminal-log/actions/AddKey.js
A web/org.openbravo.mobile.core/app/model/business-object/terminal-log/actions/AddLog.js
A web/org.openbravo.mobile.core/app/model/business-object/terminal-log/actions/AddProcess.js
A web/org.openbravo.mobile.core/app/model/business-object/terminal-log/actions/SetContextAndPopup.js
A web/org.openbravo.mobile.core/app/model/business-object/terminal-log/actions/TerminalLogGenerateMessage.js
A web/org.openbravo.mobile.core/app/model/network/Request.js
A web/org.openbravo.mobile.core/app/model/network/RequestResultListener.js
A web/org.openbravo.mobile.core/app/model/persistence/indexeddb/Comparison.js
A web/org.openbravo.mobile.core/app/model/persistence/indexeddb/Criteria.js
A web/org.openbravo.mobile.core/app/model/persistence/indexeddb/Criterion.js
A web/org.openbravo.mobile.core/app/model/persistence/indexeddb/Index.js
A web/org.openbravo.mobile.core/app/model/persistence/indexeddb/IndexedDBController.js
A web/org.openbravo.mobile.core/app/model/persistence/indexeddb/IndexedDBQuery.js
A web/org.openbravo.mobile.core/app/model/persistence/indexeddb/Model.js
A web/org.openbravo.mobile.core/app/model/synchronization-buffer/CheckSourcesVersionListener.js
A web/org.openbravo.mobile.core/app/model/synchronization-buffer/MessageModel.js
A web/org.openbravo.mobile.core/app/model/synchronization-buffer/MessageModelController.js
A web/org.openbravo.mobile.core/app/model/synchronization-buffer/SyncIconManagement.js
A web/org.openbravo.mobile.core/app/model/synchronization-buffer/SyncPollingListener.js
A web/org.openbravo.mobile.core/app/model/synchronization-buffer/SynchronizationBuffer.js
A web/org.openbravo.mobile.core/app/model/utils/ArrayUtils.js
A web/org.openbravo.mobile.core/lib/vendor/deepfreeze-2.0.0.js
A web/org.openbravo.mobile.core/lib/vendor/localforage-1.7.3.js
A web/org.openbravo.mobile.core/lib/vendor/localforage-1.7.3.min.js
A web/org.openbravo.mobile.core/lib/vendor/lodash-4.17.15.js
A web/org.openbravo.mobile.core/lib/vendor/lodash-4.17.15.min.js
A web/org.openbravo.mobile.core/lib/vendor/redux-4.0.5.js
A web/org.openbravo.mobile.core/lib/vendor/redux-4.0.5.min.js
A web/org.openbravo.mobile.core/lib/vendor/redux-persist-6.0.0.js
A web/org.openbravo.mobile.core/lib/vendor/redux-persist-6.0.0.min.js
A web/org.openbravo.mobile.core/source/utils/ob-lodash-conflict.js
R src/org/openbravo/mobile/core/utils/LogClientLoader.java
R web/org.openbravo.mobile.core/source/model/logclient.js
R web/org.openbravo.mobile.core/source/model/ob-message.js
R web/org.openbravo.mobile.core/source/model/terminal-log.js
R web/org.openbravo.mobile.core/source/utils/logClientSyncUtils.js
R web/org.openbravo.mobile.core/source/utils/ob-terminal-log.js
---
(0118006)
gorka_gil   
2020-02-21 11:26   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: f1e16c56847d
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Thu Feb 20 21:54:26 2020 +0100
URL: https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/f1e16c56847d [^]

[indexedDB-state] Fixed BUG-43288: merge to pi

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0118019)
hgbot   
2020-02-21 13:29   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 26809e4cedae18b91f294a8a6f75f7ab21be9304
Author: Javier Armendáriz <javier.armendariz <at> openbravo.com>
Date: Fri Feb 21 09:11:34 2020 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/26809e4cedae18b91f294a8a6f75f7ab21be9304 [^]

Related to BUG-43288: Initialize State after all modules are processed

Prior to this commit, models defined in other modules won't be instantiated
in the Global State as the initialization happens before the registration code
is executed.

---
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
---
(0118020)
hgbot   
2020-02-21 13:29   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: ec3511658c6d7bb5f749f031f15a06b391309b6c
Author: Javier Armendáriz <javier.armendariz <at> openbravo.com>
Date: Fri Feb 21 09:57:42 2020 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/ec3511658c6d7bb5f749f031f15a06b391309b6c [^]

Related to BUG-43288: Grouped code comment with the corresponding code block

---
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
---
(0118043)
hgbot   
2020-02-24 11:50   
Repository: erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations
Changeset: bf0dbf00f2c7bcc507da06dccdc19c353b2dd2b2
Author: Guillermo Alvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Mon Feb 24 11:50:32 2020 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/bf0dbf00f2c7bcc507da06dccdc19c353b2dd2b2 [^]

Related to BUG-43288: Adpat AWO to new sincronizationBugffer engine

---
M web/org.openbravo.warehouse.advancedwarehouseoperations/source/terminal/obawo-terminal.js
---
(0118074)
hgbot   
2020-02-25 09:21   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: ff633b0e1100f1dcd7a122e0c49f953819fae28f
Author: Javier Armendáriz <javier.armendariz <at> openbravo.com>
Date: Mon Feb 24 12:29:20 2020 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/ff633b0e1100f1dcd7a122e0c49f953819fae28f [^]

Related to ISSUE-43288: Locked StateAPI once State is initialized

Added a check that throws an exception when attempting to register another Model, action, utility
or hook to the StateAPI once OB.App.State is define. From this point no new Models can be added to the
global state.

---
M web-test/model/application-state/StateAPI.test.js
M web/org.openbravo.mobile.core/app/model/application-state/StateAPI.js
---
(0118105)
hgbot   
2020-02-25 19:18   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 30812970341d3805e2ae7d513978d475c50e0e4a
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Tue Feb 25 19:01:17 2020 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/30812970341d3805e2ae7d513978d475c50e0e4a [^]

Related to BUG-43288: cleanup calls to openLocalDB

- only mantain one call
- call it before initializeCommonComponents
- wait to finish before continue the load

---
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
---
(0118128)
hgbot   
2020-02-26 18:09   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 9839c54f05bdaac5320694be034dcbed0400785a
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Wed Feb 26 18:08:40 2020 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/9839c54f05bdaac5320694be034dcbed0400785a [^]

Related to BUG-43288: Adapt tests to modelName and context changes

Messages tests:
- Adapt test to the change of modelname to modelName

TerminalLog tests:
- Adapt tests to the inclusion of the context inside the state.
  It is no longer part of the payload, but it is read directly from the state

---
M web-test/model/business-object/messages/Messages.test.js
M web-test/model/business-object/terminal-log/TerminalLog-AddButtonClick-ActionPreparation.test.js
M web-test/model/business-object/terminal-log/TerminalLog-AddLog-ActionPreparation.test.js
M web-test/model/business-object/terminal-log/TerminalLog-AddProcess-ActionPreparation.test.js
M web-test/model/business-object/terminal-log/TerminalLog-Addkey-ActionPreparation.test.js
M web-test/model/business-object/terminal-log/TerminalLog-StateAction-AddLog.test.js
M web-test/model/business-object/terminal-log/TerminalLog-StateAction-AddProcess.test.js
M web-test/model/business-object/terminal-log/TerminalLog-StateAction-AddbuttonClick.test.js
M web-test/model/business-object/terminal-log/TerminalLog-StateAction-Addkey.test.js
---
(0118159)
hgbot   
2020-02-27 13:13   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: f97919e3728c355fe4d54c63db93ef63de4a3c7f
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Thu Feb 27 13:12:10 2020 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/f97919e3728c355fe4d54c63db93ef63de4a3c7f [^]

Related to BUG-43288: Adapt tests to avoid checkStateIsInitialized

---
M web-test/model/business-object/messages/Messages.test.js
M web-test/model/business-object/terminal-log/SetupTerminalLog.js
M web-test/model/business-object/terminal-log/TerminalLog-AddButtonClick-ActionPreparation.test.js
M web-test/model/business-object/terminal-log/TerminalLog-AddLog-ActionPreparation.test.js
M web-test/model/business-object/terminal-log/TerminalLog-AddProcess-ActionPreparation.test.js
M web-test/model/business-object/terminal-log/TerminalLog-Addkey-ActionPreparation.test.js
M web-test/model/business-object/terminal-log/TerminalLog-StateAction-AddLog.test.js
M web-test/model/business-object/terminal-log/TerminalLog-StateAction-AddProcess.test.js
M web-test/model/business-object/terminal-log/TerminalLog-StateAction-AddbuttonClick.test.js
M web-test/model/business-object/terminal-log/TerminalLog-StateAction-Addkey.test.js
A web-test/model/business-object/terminal-log/SetupTerminalLogUtils.js
---