Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036927Openbravo ERPA. Platformpublic2017-09-22 11:232018-01-03 12:38
JONHM 
caristu 
highmajorsometimes
closedfixed 
5
 
3.0PR18Q1 
alostale
Core
No
0036927: Form opened in blank when navigating to a record in a window which has a date column on the first position in grid view
When navigating to a record in a window which has a date column on the first position in grid view, sometimes the form is shown in blank.
* Having an environment with the instance activated:

1) Open 'Product' window in grid mode and show 'Creation Date' column. Put it on the first position of the grid
2) Open 'Goods Shipment' window and select some record. Switch to [Lines] tab and open the record in form view. Then open on a new tab the product.
3) Using developer's tools, notice that some extra DS requests are fired to the datasource. This can cause that the window is opened in blank with no records

Note: the same behavior happens when opening the record using the "Recent Documents" link.
The problem is caused by a race condition: under this circumstances, multiple DS requests are being fired (see attached image) which seems that can cause troubles when trying to draw the form with the target record data.
No tags attached.
related to defect 00328153.0PR16Q3 closed caristu Direct link to documents in the workspace is not working 
png Screenshot from 2017-09-22 11-00-43.png (69,993) 2017-09-22 11:23
https://issues.openbravo.com/file_download.php?file_id=11091&type=bug
png

png multipleDS.png (52,847) 2017-09-26 12:51
https://issues.openbravo.com/file_download.php?file_id=11102&type=bug
png

diff issue36927.diff (2,526) 2017-09-26 16:52
https://issues.openbravo.com/file_download.php?file_id=11104&type=bug
Issue History
2017-09-22 11:23JONHMNew Issue
2017-09-22 11:23JONHMAssigned To => platform
2017-09-22 11:23JONHMFile Added: Screenshot from 2017-09-22 11-00-43.png
2017-09-22 11:23JONHMModules => Core
2017-09-22 11:23JONHMResolution time => 1507845600
2017-09-22 11:23JONHMTriggers an Emergency Pack => No
2017-09-22 12:41alostaleRelationship addedrelated to 0032815
2017-09-25 10:49caristuStatusnew => scheduled
2017-09-25 10:49caristuAssigned Toplatform => caristu
2017-09-25 20:04caristuSummaryError when 'opening on tab' a window which have a date column on the first position in grid view => Multiple DS requests when navigation to a record in a window which have a date column on the first position in grid view
2017-09-25 20:04caristuDescription Updatedbug_revision_view_page.php?rev_id=15985#r15985
2017-09-25 20:04caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=15987#r15987
2017-09-25 20:04caristuSummaryMultiple DS requests when navigation to a record in a window which have a date column on the first position in grid view => Multiple DS requests when navigating to a record in a window which have a date column on the first position in grid view
2017-09-26 12:26caristuSummaryMultiple DS requests when navigating to a record in a window which have a date column on the first position in grid view => Form opened in blank when navigating to a record in a window which has a date column on the first position in grid view
2017-09-26 12:26caristuDescription Updatedbug_revision_view_page.php?rev_id=15991#r15991
2017-09-26 12:26caristuProposed Solution updated
2017-09-26 12:27caristuReproducibilityalways => sometimes
2017-09-26 12:35caristuFile Added: issue36927.diff
2017-09-26 12:47caristuFile Added: multipleDS.png
2017-09-26 12:47caristuFile Deleted: multipleDS.png
2017-09-26 12:48caristuFile Added: multipleDS.png
2017-09-26 12:48caristuFile Deleted: multipleDS.png
2017-09-26 12:48caristuFile Deleted: issue36927.diff
2017-09-26 12:50caristuFile Added: multipleDS.png
2017-09-26 12:51caristuFile Deleted: multipleDS.png
2017-09-26 12:51caristuFile Added: multipleDS.png
2017-09-26 12:51caristuFile Added: issue36927.diff
2017-09-26 16:52caristuFile Deleted: issue36927.diff
2017-09-26 16:52caristuFile Added: issue36927.diff
2017-10-03 16:37hgbotCheckin
2017-10-03 16:37hgbotNote Added: 0099728
2017-10-03 16:38hgbotStatusscheduled => resolved
2017-10-03 16:38hgbotResolutionopen => fixed
2017-10-03 16:38hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/54e2948eb10b7fc6a122fa54f001a8f882873985 [^]
2017-10-03 16:41hgbotCheckin
2017-10-03 16:41hgbotNote Added: 0099729
2017-10-03 16:41caristuReview Assigned To => alostale
2017-10-06 12:33alostaleNote Added: 0099793
2017-10-06 12:33alostaleStatusresolved => closed
2017-10-06 12:33alostaleFixed in Version => 3.0PR18Q1
2018-01-03 12:38hudsonbotCheckin
2018-01-03 12:38hudsonbotNote Added: 0101311
2018-01-03 12:38hudsonbotCheckin
2018-01-03 12:38hudsonbotNote Added: 0101312

Notes
(0099728)
hgbot   
2017-10-03 16:37   
Repository: erp/devel/pi
Changeset: 54e2948eb10b7fc6a122fa54f001a8f882873985
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue Sep 26 12:41:49 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/54e2948eb10b7fc6a122fa54f001a8f882873985 [^]

fixes bug 36927: Multiple DS requests having a date item as first focused item

  When directly opening a record in a tab which has a date item as the first focused item, extra DS calls were fired which could prevent the record to be opened properly (the form displayed in blank)

  This has happening because a combination of different facts:

   - When the grid is redrawn, Smarclient fires an update of the first focused item. In the case of date items this causes that false item edition is fired because it detects that the value of the date item filter changes from undefined to empty string.

   - If the previous scenario happens while opening a record directly, the grid datasource detects that it needs to fetch data because at this point the number of cached rows is different from the total rows (see [1]).

  To avoid those extra DS requests we now ignore those false item editions while a target record is being opened.

[1] https://code.openbravo.com/erp/mods/org.openbravo.userinterface.smartclient.dev/file/66d2b640b66e/web/org.openbravo.userinterface.smartclient/isomorphic/client/application/ResultSet.js#l833 [^]

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-minidaterange.js
---
(0099729)
hgbot   
2017-10-03 16:41   
Repository: erp/devel/pi
Changeset: 7b2a0a999bb27a0052d38d06369fe2f9950c2290
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue Oct 03 16:24:09 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/7b2a0a999bb27a0052d38d06369fe2f9950c2290 [^]

related to issue 36927: update copyright year

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-minidaterange.js
---
(0099793)
alostale   
2017-10-06 12:33   
reviewed + tested
(0101311)
hudsonbot   
2018-01-03 12:38   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/c81e0d3cbab5 [^]
Maturity status: Test
(0101312)
hudsonbot   
2018-01-03 12:38   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/c81e0d3cbab5 [^]
Maturity status: Test