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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0036332
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] StoreServermajorhave not tried2017-06-26 12:142017-07-11 17:32
ReportermtaalView Statuspublic 
Assigned Tomtaal 
PrioritynormalResolutionfixedFixed in VersionRR17Q4
StatusclosedFix in branchFixed in SCM revision46a1e1d2d949
ProjectionnoneETAnoneTarget Version
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

0036332: Incremental load does not call ready with loading in case of remote models in specific case

DescriptionThe normal logic of incremental load calls triggerRead [1] after each locally stored model is reloaded.
However in case of remote model [2] or other cases [3] triggerReady is not called.

The consequence of this is that if the last model in the queue is a remote model the loading popup remains visible and does not go away. See attached screenshot.

[1]
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/fbd548334939/web/org.openbravo.mobile.core/source/data/ob-dal.js#l1606 [^]

[2]
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/fbd548334939/web/org.openbravo.mobile.core/source/data/ob-dal.js#l1619 [^]

[3]
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/fbd548334939/web/org.openbravo.mobile.core/source/data/ob-dal.js#l1624 [^]
Steps To ReproduceSet remote product model
Install gift card module
Put a breakpoint here [1] in the javascript code
Find the GiftCard model in the list of models
OB.OBPOSPointOfSale.Model.PointOfSale.prototype.models
Move the GiftCard model to the end of java script list

Proposed SolutionCall triggerReady here [1] and remove it here [2]

[1]
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/fbd548334939/web/org.openbravo.mobile.core/source/data/ob-dal.js#l1564 [^]

[2]
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/fbd548334939/web/org.openbravo.mobile.core/source/data/ob-dal.js#l1606 [^]

TagsNo tags attached.
Attached Filespng file icon Idle1.png [^] (244,323 bytes) 2017-06-26 12:14


diff file icon 36332.diff [^] (600 bytes) 2017-06-26 12:15 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
depends on backport 0036369RR17Q2.2 closedmtaal Incremental load does not call ready with loading in case of remote models in specific case 
depends on backport 0036467RR17Q3 closedmtaal Incremental load does not call ready with loading in case of remote models in specific case 
has duplicate defect 0036030 closedmtaal [RR17Q2][Store Server][HighVol] After being POS idle some time, it logs out and gets stuck "Loading..." 

-  Notes
(0097746)
hgbot (developer)
2017-06-28 22:48

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: c1f54f03208f0df306a67f2aa155746460d24314
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Wed Jun 28 22:45:57 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/c1f54f03208f0df306a67f2aa155746460d24314 [^]

Fixes issue 36332: Incremental load does not call ready with loading in case of remote models in specific case
Call ready after setting a model load to true

---
M web/org.openbravo.mobile.core/source/data/ob-dal.js
---
(0097765)
mtaal (manager)
2017-06-29 13:15

backout to research more why the issue happens, it seems difficult to reproduce.
(0097766)
hgbot (developer)
2017-06-29 13:17

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 569413d72c951a856a3e9fa4fd75565e7d016205
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Thu Jun 29 13:16:58 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/569413d72c951a856a3e9fa4fd75565e7d016205 [^]

Related to issue 36332: Incremental load does not call ready with loading in case of remote models in specific case
It is not clearly reproducable, to be sure on the fix, retry in q4

---
M web/org.openbravo.mobile.core/source/data/ob-dal.js
---
(0097818)
mtaal (manager)
2017-07-04 09:12

The current code has an async issue. This if statement [1] checks the value of the somethigToLoad variable. However, this variable is set to true in an async manner, so this means that the if statement is executed at the wrong time. The variable seems to be set synchronously [3] but the processModelAtIndex is called asynchronously from here [2]. So there is an asynchronous flow possible and this also happens (can be seen when debugging).

The mantis issue is only visible when doing incremental load after login. During login the issue does not occur. Probably becauuse during login the models._LoadOnline [4] is true.


[1]
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/d0dc67e84549/web/org.openbravo.mobile.core/source/data/ob-dal.js#l1639 [^]

[2]
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/d0dc67e84549/web/org.openbravo.mobile.core/source/data/ob-dal.js#l1574 [^]

[3]
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/d0dc67e84549/web/org.openbravo.mobile.core/source/data/ob-dal.js#l1587 [^]

[4]
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/d0dc67e84549/web/org.openbravo.mobile.core/source/data/ob-dal.js#l1509 [^]
(0097819)
hgbot (developer)
2017-07-04 09:14

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 46a1e1d2d9498bc4ea719de1d1d6cf3f89704f80
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Jul 04 09:14:33 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/46a1e1d2d9498bc4ea719de1d1d6cf3f89704f80 [^]

Fixes issue 36332: Incremental load does not call ready with loading in case of remote models in specific case
The model ready trigger is executed when the last processModelAtIndex call is done. The flow in the code
will always end up in this point, so no need to have a separate if for this.

---
M web/org.openbravo.mobile.core/source/data/ob-dal.js
---
(0097821)
hgbot (developer)
2017-07-04 09:26

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: f7912942aaa331397eb2674d4f606826619b33a8
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Jul 04 09:26:13 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/f7912942aaa331397eb2674d4f606826619b33a8 [^]

Related to issue 36332: Incremental load does not call ready with loading in case of remote models in specific case
Remove unused var

---
M web/org.openbravo.mobile.core/source/data/ob-dal.js
---
(0098020)
mtaal (manager)
2017-07-11 17:31

Moving back to new-->scheduled to also backport to q3
(0098021)
mtaal (manager)
2017-07-11 17:32

closing again after creating backport issue

- Issue History
Date Modified Username Field Change
2017-06-26 12:14 mtaal New Issue
2017-06-26 12:14 mtaal Assigned To => mtaal
2017-06-26 12:14 mtaal File Added: Idle1.png
2017-06-26 12:14 mtaal Triggers an Emergency Pack => No
2017-06-26 12:14 mtaal Relationship added has duplicate 0036030
2017-06-26 12:15 mtaal File Added: 36332.diff
2017-06-28 22:45 mtaal Status new => scheduled
2017-06-28 22:48 hgbot Checkin
2017-06-28 22:48 hgbot Note Added: 0097746
2017-06-28 22:48 hgbot Status scheduled => resolved
2017-06-28 22:48 hgbot Resolution open => fixed
2017-06-28 22:48 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/c1f54f03208f0df306a67f2aa155746460d24314 [^]
2017-06-29 10:59 mtaal Review Assigned To => marvintm
2017-06-29 13:15 mtaal Note Added: 0097765
2017-06-29 13:15 mtaal Status resolved => new
2017-06-29 13:15 mtaal Resolution fixed => open
2017-06-29 13:17 hgbot Checkin
2017-06-29 13:17 hgbot Note Added: 0097766
2017-06-30 10:42 mtaal Target Version RR17Q3 =>
2017-07-04 09:12 mtaal Note Added: 0097818
2017-07-04 09:14 hgbot Checkin
2017-07-04 09:14 hgbot Note Added: 0097819
2017-07-04 09:14 hgbot Status new => resolved
2017-07-04 09:14 hgbot Resolution open => fixed
2017-07-04 09:14 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/c1f54f03208f0df306a67f2aa155746460d24314 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/46a1e1d2d9498bc4ea719de1d1d6cf3f89704f80 [^]
2017-07-04 09:26 hgbot Checkin
2017-07-04 09:26 hgbot Note Added: 0097821
2017-07-04 18:56 marvintm Status resolved => closed
2017-07-04 18:56 marvintm Fixed in Version => RR17Q4
2017-07-11 17:31 mtaal Note Added: 0098020
2017-07-11 17:31 mtaal Status closed => new
2017-07-11 17:31 mtaal Resolution fixed => open
2017-07-11 17:31 mtaal Fixed in Version RR17Q4 =>
2017-07-11 17:31 mtaal Status new => scheduled
2017-07-11 17:32 mtaal Status scheduled => resolved
2017-07-11 17:32 mtaal Fixed in Version => RR17Q4
2017-07-11 17:32 mtaal Resolution open => fixed
2017-07-11 17:32 mtaal Note Added: 0098021
2017-07-11 17:32 mtaal Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker