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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0043721
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSminorN/A2020-04-13 14:152020-04-22 07:10
ReportercaristuView Statuspublic 
Assigned Tocaristu 
PriorityhighResolutionfixedFixed in VersionRR20Q3
StatusclosedFix in branchFixed in SCM revisionf3bf0b0001db
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0043721: Change IndexedDBController and MasterdataController API to define async functions instead of returning Promises

DescriptionThe 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 SolutionReplace Promise returning with async function definition
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(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
---

- Issue History
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 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
Powered by Mantis Bugtracker