Openbravo Issue Tracking System - Retail Modules
View Issue Details
0039360Retail ModulesWeb POSpublic2018-09-27 12:512019-06-18 12:34
gorka_gil 
gorka_gil 
normalmajorN/A
closedfixed 
5
 
RR19Q1 
marvintm
No
0039360: Terminal Log : Improve log client with cashier actions and processes start/end info
A) Log client saves info, warn, error messages generated by the pos.


B) There is a project to create a new log with cashier actions and other events but adding in the code all this log.


C) There is another project that add a log to each button or key pressed.


D) In this feature request, idea is to improve the idea behind C), so in a central place and generic, saves logs of each click and key pressed, and improve till reach a similar level than B), that has hardcoded in many places of the code the log messages. Also apart of cashier actions will save the processes start/end.


The purpose is to help understand better what has happen in case of a problem.

And second objective is to not have to add log in all the places of the code, but this is created in a central place and don't require edit the code, so automatically applies to all modules.


Special care will be taken to ensure that we cause no performance degradation in the client side, we don't generate too much data which needs to be synchronized with the backend, and we also don't cause performance problems in the backend because of the new data we need to save.
-
No tags attached.
related to defect 0039699 closed caristu Openbravo ERP SortingFilteringGridConfiguration is failing when it should be skipped 
related to defect 0039968 scheduled Retail Retail Modules Terminal log model appear in the pending models to be synchronized when offline 
related to defect 0041118 scheduled Retail Retail Modules Column "em_obpos_applications_id" of "c_import_entry" not filled by "OBMOBC_TerminalLog" or "OBCFR_TerminalMonitor" 
related to defect 0041184 new Retail Retail Modules Terminal Log: fix createdby of table terminal log 
causes defect 0039725 closed alostale Openbravo ERP ViewGeneration fails in retail CI 
causes defect 0040054 closed gorka_gil Retail Modules Clicking "x" button in a receipt paying process throws a JS error 
diff terminallog-q3-erp.diff (4,640) 2018-12-11 11:25
https://issues.openbravo.com/file_download.php?file_id=12423&type=bug
diff terminallog-q3-mobilecore.diff (116,206) 2018-12-11 11:25
https://issues.openbravo.com/file_download.php?file_id=12424&type=bug
diff terminallog-q3-posterminal.diff (17,682) 2018-12-11 11:26
https://issues.openbravo.com/file_download.php?file_id=12425&type=bug
Issue History
2018-09-27 12:51gorka_gilNew Issue
2018-09-27 12:51gorka_gilAssigned To => Retail
2018-09-27 12:51gorka_gilTriggers an Emergency Pack => No
2018-09-27 12:51gorka_gilAssigned ToRetail => gorka_gil
2018-09-27 12:51gorka_gilStatusnew => scheduled
2018-11-27 10:47caristuRelationship addedrelated to 0039699
2018-11-28 14:29hgbotCheckin
2018-11-28 14:29hgbotNote Added: 0108147
2018-11-28 14:29hgbotCheckin
2018-11-28 14:29hgbotNote Added: 0108148
2018-11-28 14:32hgbotCheckin
2018-11-28 14:32hgbotNote Added: 0108150
2018-11-28 14:33hgbotCheckin
2018-11-28 14:33hgbotNote Added: 0108151
2018-11-28 17:40gorka_gilStatusscheduled => resolved
2018-11-28 17:40gorka_gilResolutionopen => fixed
2018-11-30 13:22hgbotCheckin
2018-11-30 13:22hgbotNote Added: 0108190
2018-11-30 14:58hgbotCheckin
2018-11-30 14:58hgbotNote Added: 0108192
2018-11-30 15:06alostaleRelationship addedcauses 0039725
2018-11-30 15:07hgbotCheckin
2018-11-30 15:07hgbotNote Added: 0108194
2018-12-01 20:51hgbotCheckin
2018-12-01 20:51hgbotNote Added: 0108207
2018-12-11 11:25gorka_gilFile Added: terminallog-q3-erp.diff
2018-12-11 11:25gorka_gilFile Added: terminallog-q3-mobilecore.diff
2018-12-11 11:26gorka_gilFile Added: terminallog-q3-posterminal.diff
2018-12-11 11:27gorka_gilNote Added: 0108383
2018-12-11 20:22hudsonbotCheckin
2018-12-11 20:22hudsonbotNote Added: 0108504
2018-12-12 16:55hgbotCheckin
2018-12-12 16:55hgbotNote Added: 0108558
2018-12-13 10:21marvintmReview Assigned To => marvintm
2018-12-13 10:21marvintmStatusresolved => closed
2018-12-13 10:21marvintmFixed in Version => RR19Q1
2018-12-13 14:03hgbotCheckin
2018-12-13 14:03hgbotNote Added: 0108585
2019-01-16 18:42gorka_gilRelationship addedrelated to 0039968
2019-01-29 18:55gorka_gilRelationship addedcauses 0040054
2019-06-18 12:31gorka_gilRelationship addedrelated to 0041118
2019-06-18 12:31gorka_gilSummaryImprove log client with cashier actions and processes start/end info => Terminal Log: Improve log client with cashier actions and processes start/end info
2019-06-18 12:34gorka_gilSummaryTerminal Log: Improve log client with cashier actions and processes start/end info => Terminal Log : Improve log client with cashier actions and processes start/end info
2019-06-26 16:07gorka_gilRelationship addedrelated to 0041184

Notes
(0108147)
hgbot   
2018-11-28 14:29   
Repository: erp/devel/pi
Changeset: 9045f47e9ae714123a3bd79f58beeb72ff50be77
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Wed Nov 28 13:52:50 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/9045f47e9ae714123a3bd79f58beeb72ff50be77 [^]

[TerminalLog] Related to issue 39360: Add Terminal Log project

Implement the ability in the import entry processor to skip the archiving per entry type

---
M src/org/openbravo/service/importprocess/ImportEntryArchiveManager.java
M src/org/openbravo/service/importprocess/ImportEntryProcessor.java
---
(0108148)
hgbot   
2018-11-28 14:29   
Repository: tools/automation/pi-mobile
Changeset: 390c13cdc1d050b7517114db795de239092cbea1
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Wed Nov 28 13:56:44 2018 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/390c13cdc1d050b7517114db795de239092cbea1 [^]

[TerminalLog] Related to issue 39360: Add Terminal Log project

Fix tests:
  - I30412_QuotationsAndPromotions.java
  - I33307_VerifyLoginUserWithTwoDistinctRoles.java

Disable some SharedPaymentMethods till issue 39691 is fixed.

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/I30412_QuotationsAndPromotions.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/loginout/I33307_VerifyLoginUserWithTwoDistinctRoles.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sharedpaymentmethods/I31591_VerifySharePaymentsCashup.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sharedpaymentmethods/I35901_SPMVerifyErrorPopupInSlave.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sharedpaymentmethods/SPMMulticurrencyPayInEURUSD.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sharedpaymentmethods/SPMNeedToCloseMaster.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sharedpaymentmethods/SPMQuotationSharedPayments.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sharedpaymentmethods/SPMSaleAndReloadSharedPayments.java
---
(0108150)
hgbot   
2018-11-28 14:32   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 1392001fae5266678b988e6d34f0550a9da81209
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Wed Nov 28 13:35:27 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/1392001fae5266678b988e6d34f0550a9da81209 [^]

[TerminalLog] Related to issue 39360: Added Terminal log project

- From this commit, it will be logged:
   - User actions: all click and key pressed
   - start and finish of web pos processes
- The way that works is:
   - All events are saved in ram
   - There is a backup process that take a backup to local storage each sec (by default)
      - When closing the window or pressing F5 it should take a local backup
   - There is another process each 30 secs that creates an entry in the models to
     be synchronized by runsyncprocess
   - The next runsyncprocess will sync the terminal log.
      - The model of terminal log is the last to be synchronized in a runsyncprocess
   - Note: the old log client is still synchronized in each own way.
- logclient table
   - loglevel column: make it reference list
      - as consecuence it goes from a string of 255 char to 60 char
      - values:
         - Functional - User action
         - Technical - Process
         - Technical - Info
         - Technical - Warn
         - Technical - Error
   - Added columns:
      - context : contains the context in which has been created the log line,
        like pos window or documentno
      - tstamp : contains the timestamp with miliseconds, usefull for sorting
        since created column don't have miliseconds and can not be added
   - Added many indexes
   - Rename "log client" window in erp to "terminal log" (db table remains logclient)
   - Added grid configuration to terminal log window, to only allow actions that are indexed
   - The inserts in the table are done with xsql instead of dal, becasue dal don't allow
     to modify the created column and for avoid to do an inserte and update per line.
   - Modify the log client to also fill the context and tstamp columns.
- Preferences:
   - Disable user actions log : OBMOBC_EnableTerminalLogUserActions
   - Disable processes log : OBMOBC_EnableTerminalLogProcess
   - Interval to create package to be synchronized by runsynprocess (by default 30 secs):
     OBMOBC_TerminalLogSyncInterval
   - Interval to create backups inside web pos in case of F5 or similar (by default 1 sec):
     OBMOBC_TerminalLogBackupInterval
- Mobile processes:
   - Add new column to indicate if this process should be logged or not
- Deleted human log, since this project replaces it

---
M src-db/database/model/tables/OBMOBC_LOGCLIENT.xml
M src-db/database/model/tables/OBMOBC_PROCESS_DEFINITION.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_DATASET.xml
M src-db/database/sourcedata/AD_DATASET_TABLE.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src-db/database/sourcedata/AD_MENU.xml
M src-db/database/sourcedata/AD_PREFERENCE.xml
M src-db/database/sourcedata/AD_REFERENCE.xml
M src-db/database/sourcedata/AD_REF_LIST.xml
M src-db/database/sourcedata/AD_TAB.xml
M src-db/database/sourcedata/AD_WINDOW.xml
M src-db/database/sourcedata/OBMOBC_PROCESS_DEFINITION.xml
M src-db/database/sourcedata/OBMOBC_SERVICES.xml
M src/org/openbravo/mobile/core/MobileCoreComponentProvider.java
M src/org/openbravo/mobile/core/login/MobileCoreLoginUtilsServlet.java
M src/org/openbravo/mobile/core/utils/LogClientLoader.java
M web/org.openbravo.mobile.core/source/component/ob-commonbuttons.js
M web/org.openbravo.mobile.core/source/model/logclient.js
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
M web/org.openbravo.mobile.core/source/retail/component/ob-retail-searchproductcharacteristic.js
M web/org.openbravo.mobile.core/source/utils/ob-dom-extension.js
M web/org.openbravo.mobile.core/source/utils/ob-processcontroller.js
M web/org.openbravo.mobile.core/source/utils/ob-utilities.js
M web/org.openbravo.mobile.core/source/utils/ob-utilitiesui.js
A referencedata/standard/Obmobc_logclient_grid_config.xml
A src/org/openbravo/mobile/core/TerminalLogLoader.java
A src/org/openbravo/mobile/core/UserEventLoaderQueries_data.xsql
A src/org/openbravo/mobile/core/importprocess/TerminalLogImportEntryProcessor.java
A web/org.openbravo.mobile.core/source/model/terminal-log.js
A web/org.openbravo.mobile.core/source/utils/ob-terminal-log.js
A web/org.openbravo.mobile.core/source/utils/terminal-log-sync-utils.js
R web/org.openbravo.mobile.core/source/utils/ob-loghumanaction.js
---
(0108151)
hgbot   
2018-11-28 14:33   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 3d551a331438b15bf9150a24711d9352127356b6
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Wed Nov 28 13:44:12 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/3d551a331438b15bf9150a24711d9352127356b6 [^]

[TerminalLog] Related to issue 39360: Add terminal log project

- Created mobile processes:
  - addPayment
  - searchProduct
  - searchCustomer
  - searchCustomerAddress
- Reorder models to sync: move the terminal log model to end since has the less priority
- When load an order set the context to the order documentno

---
M src-db/database/sourcedata/OBMOBC_PROCESS_DEFINITION.xml
M web/org.openbravo.retail.posterminal/js/components/bplocation.js
M web/org.openbravo.retail.posterminal/js/components/bplocationship.js
M web/org.openbravo.retail.posterminal/js/components/businesspartner_selector.js
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0108190)
hgbot   
2018-11-30 13:22   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: a0d858f8db7814789897aefd7a2f4fe96a348739
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Fri Nov 30 13:21:53 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/a0d858f8db7814789897aefd7a2f4fe96a348739 [^]

[TerminalLog] Related to issue 39360: Change terminal log import entry to don't use posterminal classes

---
M src/org/openbravo/mobile/core/TerminalLogLoader.java
M src/org/openbravo/mobile/core/importprocess/TerminalLogImportEntryProcessor.java
---
(0108192)
hgbot   
2018-11-30 14:58   
Repository: tools/automation/pi-mobile
Changeset: 7ba0ebd347f3303ef0650d6bc52f279795008db4
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Fri Nov 30 14:58:18 2018 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/7ba0ebd347f3303ef0650d6bc52f279795008db4 [^]

[TerminalLog] Related to issue 39360: Disable some SharedPaymentMethods tests till issue 39691 is fixed

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sharedpaymentmethods/I31822_SPMQuotationSharedPayments.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sharedpaymentmethods/SPMDiscountsWithPriceIncludeTaxes.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sharedpaymentmethods/SPMDiscountsWithoutPriceIncludeTaxes.java
---
(0108194)
hgbot   
2018-11-30 15:07   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 01d5bef9c9516b7aa1228e861ff7fa41b637e4f6
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Fri Nov 30 15:07:12 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/01d5bef9c9516b7aa1228e861ff7fa41b637e4f6 [^]

[TerminalLog] Related to issue 39360: Fix license

---
M src/org/openbravo/mobile/core/UserEventLoaderQueries_data.xsql
---
(0108207)
hgbot   
2018-12-01 20:51   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 8ef9cd2bbbeeecf5cfa420e1162f449e4c674f2c
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Sat Dec 01 20:51:37 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/8ef9cd2bbbeeecf5cfa420e1162f449e4c674f2c [^]

Related to issue 39360. Message related to non-defined form in class should not be warn but debug, similar to the same message related to the security preference

---
M src/org/openbravo/mobile/core/process/SecuredJSONProcess.java
---
(0108383)
gorka_gil   
2018-12-11 11:27   
Attached patches for 18q3:
- terminallog-q3-erp.diff
- terminallog-q3-mobilecore.diff
- terminallog-q3-posterminal.diff
(0108504)
hudsonbot   
2018-12-11 20:22   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/470e3cd384c5 [^]
Maturity status: Test
(0108558)
hgbot   
2018-12-12 16:55   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 4bd4a7bada88d897f3a5bedf21e95042fcd7d361
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Mon Dec 10 18:02:53 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/4bd4a7bada88d897f3a5bedf21e95042fcd7d361 [^]

Related to issue 39360: Code review

- Do not change the physical order of column loglevel in OBMOBC_LOGCLIENT table
- Add check Y/N to new column TERMINALLOG of table OBMOBC_PROCESS_DEFINITION
- Use the new log4j2 in TerminalLogLoader

---
M src-db/database/model/tables/OBMOBC_LOGCLIENT.xml
M src-db/database/model/tables/OBMOBC_PROCESS_DEFINITION.xml
M src/org/openbravo/mobile/core/TerminalLogLoader.java
---
(0108585)
hgbot   
2018-12-13 14:03   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 2ce7a00d14aef4378e42ec31a098315a3ba62fb9
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Thu Dec 13 13:37:24 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/2ce7a00d14aef4378e42ec31a098315a3ba62fb9 [^]

[TerminalLog] Related to issue 39360: Initialize terminal log model

It was failing when changing terminal, for example test: I36010_PayCertificateTicketOtherTerminal

---
M web/org.openbravo.mobile.core/source/utils/ob-terminal-log.js
---