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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0055432
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajorsometimes2024-05-08 03:592024-05-17 09:22
ReporterivazquezView Statuspublic 
Assigned ToSABARINATH P 
PriorityhighResolutionfixedFixed in VersionRR24Q3
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0055432: Error in verified return with many lines in the JS StatePersistance.js

DescriptionWe have a customer who reported that he gets the following error when he makes a verified return with many lines and the lines have high qty, the error reported is as follows:

Uncaught TypeError: Cannot read properties of null (reading 'length')

This is executed in the following line:

https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/blob/master/web/org.openbravo.mobile.core/app/model/application-state/StatePersistence.js?ref_type=heads#L227 [^]

Where localStorage.getItem(k) is null, so when doing .length it returns error.

Steps To ReproduceI will leave a video attached reproducing the error in the client environment, what we also saw is a drop in performance when trying to make the verified return of this specific order, I think it is related to the large number of lines and quantities that have these lines as such.
Proposed SolutionAs we saw in other JS like the TicketUtils.js in the org.openbravo.pos2 module:

https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/blob/master/web-jspack/org.openbravo.pos2/src/model/ticket/TicketUtils.js?ref_type=heads#L559 [^]

Where it is examined that localStorage.getItems(k) is not null and if it is, it returns 0.
TagsNo tags attached.
Attached Files? file icon cdslengthproblem.mp4 [^] (2,362,915 bytes) 2024-05-08 04:08

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0164465)
hgbot (developer)
2024-05-13 07:29

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/705 [^]
(0164733)
hgbot (developer)
2024-05-17 09:22

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/705 [^]
(0164734)
hgbot (developer)
2024-05-17 09:22

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: cbeca37e699e632c8fab771b8fdc88078c243ae1
Author: Sabarinath <sabarinath.palanisamy.ext@openbravo.com>
Date: 17-05-2024 12:50:42
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/cbeca37e699e632c8fab771b8fdc88078c243ae1 [^]

Fixed ISSUE-55432: Returns localStorage if its there otherwise returns 0

---
M web/org.openbravo.mobile.core/app/model/application-state/StatePersistence.js
---

- Issue History
Date Modified Username Field Change
2024-05-08 03:59 ivazquez New Issue
2024-05-08 03:59 ivazquez Assigned To => Retail
2024-05-08 03:59 ivazquez Triggers an Emergency Pack => No
2024-05-08 04:08 ivazquez File Added: cdslengthproblem.mp4
2024-05-10 13:47 jorgewederago Status new => acknowledged
2024-05-10 14:57 SABARINATH P Assigned To Retail => SABARINATH P
2024-05-10 14:58 SABARINATH P Status acknowledged => scheduled
2024-05-13 07:29 hgbot Note Added: 0164465
2024-05-17 09:22 hgbot Note Added: 0164733
2024-05-17 09:22 hgbot Resolution open => fixed
2024-05-17 09:22 hgbot Status scheduled => closed
2024-05-17 09:22 hgbot Fixed in Version => RR24Q3
2024-05-17 09:22 hgbot Note Added: 0164734


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker