Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0044352 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] Web POS | minor | have not tried | 2020-06-12 09:49 | 2020-06-22 10:57 | |||
Reporter | jarmendariz | View Status | public | |||||
Assigned To | jarmendariz | |||||||
Priority | urgent | Resolution | fixed | Fixed in Version | RR20Q3 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 406cf2e12759 | ||||
Projection | none | ETA | none | Target Version | RR20Q3 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | marvintm | |||||||
OBNetwork customer | No | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0044352: State.getState() should not deep-clone the state | |||||||
Description | With the new application state, to avoid mutating the state directly, OB.App.State.getState() makes a deep clone of the state persisted in Redux. This is inconvenient for two reasons: 1- This allows developers to mutate the cloned state, which is a bad practice and a bad example that can be followed on actions/action preparations where state must me immutable 2- Deep cloning the whole state may lead to performance issues For this reason, it is preferable not to clone the state in this function. | |||||||
Steps To Reproduce | See above | |||||||
Proposed Solution | Remove deep clone in getState function and return the state as-is. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
|
![]() |
|
(0120861) hgbot (developer) 2020-06-16 12:24 |
Repository: erp/pmods/org.openbravo.mobile.core Changeset: 406cf2e1275915a4a1b3a738e6cafaa1367e67df Author: Javier Armendáriz <javier.armendariz <at> openbravo.com> Date: Fri Jun 12 09:57:17 2020 +0200 URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/406cf2e1275915a4a1b3a738e6cafaa1367e67df [^] Fixed ISSUE-44352: getState function should not deep clone state --- M web-test/model/application-state/State.test.js M web/org.openbravo.mobile.core/app/model/application-state/State.js --- |
(0120880) hgbot (developer) 2020-06-17 09:01 |
Repository: erp/pmods/org.openbravo.mobile.core Changeset: 3529d663b1c950ee8c2d650e0b48ee9b63363a62 Author: Javier Armendáriz <javier.armendariz <at> openbravo.com> Date: Wed Jun 17 09:00:53 2020 +0200 URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/3529d663b1c950ee8c2d650e0b48ee9b63363a62 [^] Related to ISSUE-44352: Fixed ESLint issue --- M web/org.openbravo.mobile.core/app/model/application-state/State.js --- |
![]() |
|||
Date Modified | Username | Field | Change |
2020-06-12 09:49 | jarmendariz | New Issue | |
2020-06-12 09:49 | jarmendariz | Assigned To | => jarmendariz |
2020-06-12 09:49 | jarmendariz | OBNetwork customer | => No |
2020-06-12 09:49 | jarmendariz | Triggers an Emergency Pack | => No |
2020-06-12 09:58 | jarmendariz | Status | new => scheduled |
2020-06-12 11:44 | jarmendariz | Review Assigned To | => marvintm |
2020-06-16 12:24 | hgbot | Checkin | |
2020-06-16 12:24 | hgbot | Note Added: 0120861 | |
2020-06-16 12:24 | hgbot | Status | scheduled => resolved |
2020-06-16 12:24 | hgbot | Resolution | open => fixed |
2020-06-16 12:24 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/406cf2e1275915a4a1b3a738e6cafaa1367e67df [^] |
2020-06-17 09:01 | hgbot | Checkin | |
2020-06-17 09:01 | hgbot | Note Added: 0120880 | |
2020-06-22 10:57 | marvintm | Status | resolved => closed |
2020-06-22 10:57 | marvintm | Fixed in Version | => RR20Q3 |
Copyright © 2000 - 2009 MantisBT Group |