Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0043721 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] Web POS | minor | N/A | 2020-04-13 14:15 | 2020-04-22 07:10 | |||
Reporter | caristu | View Status | public | |||||
Assigned To | caristu | |||||||
Priority | high | Resolution | fixed | Fixed in Version | RR20Q3 | |||
Status | closed | Fix in branch | Fixed in SCM revision | f3bf0b0001db | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | alostale | |||||||
OBNetwork customer | No | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0043721: Change IndexedDBController and MasterdataController API to define async functions instead of returning Promises | |||||||
Description | The functions of IndexedDBController and MasterdataController that are returning Promises can be changed to define them as async functions. See [1] and [2]. In the case of IndexedDBController functions we can follow this pattern[3]. This change should be transparent for the API consumers. [1] https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/blob/master/web/org.openbravo.mobile.core/app/model/persistence/indexeddb/IndexedDBController.js#L206 [^] [2] https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/blob/master/web/org.openbravo.mobile.core/app/model/masterdata/MasterdataController.js#L482 [^] [3] https://stackoverflow.com/questions/46933801/how-do-i-wrap-a-callback-with-async-await/46933884#46933884 [^] | |||||||
Steps To Reproduce | . | |||||||
Proposed Solution | Replace Promise returning with async function definition | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
|
![]() |
|
(0119229) hgbot (developer) 2020-04-17 09:43 |
Repository: erp/pmods/org.openbravo.mobile.core Changeset: f3bf0b0001dbfda3e7549de5b71821dd8258b26f Author: Carlos Aristu <carlos.aristu <at> openbravo.com> Date: Wed Apr 15 17:31:25 2020 +0200 URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/f3bf0b0001dbfda3e7549de5b71821dd8258b26f [^] fixes BUG-43721: define async functions Define async functions in both the IndexedDB and Masterdata APIs instead of returning Promises. Together with those changes we are also removing a useless third parameter when invoking IndexedDBController.put in two places of the MasterdataController. Currently this function accepts just two arguments. --- M web/org.openbravo.mobile.core/app/model/masterdata/MasterdataController.js M web/org.openbravo.mobile.core/app/model/masterdata/MasterdataModel.js M web/org.openbravo.mobile.core/app/model/persistence/indexeddb/IndexedDBController.js M web/org.openbravo.mobile.core/app/model/persistence/indexeddb/IndexedDBQuery.js M web/org.openbravo.mobile.core/app/model/persistence/indexeddb/Model.js M web/org.openbravo.mobile.core/app/model/synchronization-buffer/MessageModelController.js M web/org.openbravo.mobile.core/app/model/synchronization-buffer/SynchronizationBuffer.js --- |
(0119230) hgbot (developer) 2020-04-17 10:08 |
Repository: erp/pmods/org.openbravo.mobile.core Changeset: 706c2f637dc33879677e130564f7f59e12f12d73 Author: Carlos Aristu <carlos.aristu <at> openbravo.com> Date: Fri Apr 17 10:07:32 2020 +0200 URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/706c2f637dc33879677e130564f7f59e12f12d73 [^] related to BUG-43721: define async functions in web-test --- M web-test/model/persistence/indexeddb/IndexedDBController.test.js M web-test/model/persistence/indexeddb/models.js --- |
![]() |
|||
Date Modified | Username | Field | Change |
2020-04-13 14:15 | caristu | New Issue | |
2020-04-13 14:15 | caristu | Assigned To | => Retail |
2020-04-13 14:15 | caristu | OBNetwork customer | => No |
2020-04-13 14:15 | caristu | Triggers an Emergency Pack | => No |
2020-04-13 14:15 | caristu | Summary | Change IndexedDBController and MasterdataController API to define asyn functions instead of returning Promises => Change IndexedDBController and MasterdataController API to define async functions instead of returning Promises |
2020-04-16 08:08 | alostale | Assigned To | Retail => caristu |
2020-04-16 08:09 | alostale | Review Assigned To | => alostale |
2020-04-17 09:43 | hgbot | Checkin | |
2020-04-17 09:43 | hgbot | Note Added: 0119229 | |
2020-04-17 09:43 | hgbot | Status | new => resolved |
2020-04-17 09:43 | hgbot | Resolution | open => fixed |
2020-04-17 09:43 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/f3bf0b0001dbfda3e7549de5b71821dd8258b26f [^] |
2020-04-17 10:08 | hgbot | Checkin | |
2020-04-17 10:08 | hgbot | Note Added: 0119230 | |
2020-04-22 07:10 | alostale | Status | resolved => closed |
2020-04-22 07:10 | alostale | Fixed in Version | => RR20Q3 |
Copyright © 2000 - 2009 MantisBT Group |