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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0044352
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSminorhave not tried2020-06-12 09:492020-06-22 10:57
ReporterjarmendarizView Statuspublic 
Assigned Tojarmendariz 
PriorityurgentResolutionfixedFixed in VersionRR20Q3
StatusclosedFix in branchFixed in SCM revision406cf2e12759
ProjectionnoneETAnoneTarget VersionRR20Q3
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomarvintm
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0044352: State.getState() should not deep-clone the state

DescriptionWith 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 ReproduceSee above
Proposed SolutionRemove deep clone in getState function and return the state as-is.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

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

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