Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029259Openbravo ERPA. Platformpublic2015-03-12 15:452015-11-30 11:01
shuehner 
caristu 
normalminoralways
closedfixed 
5
 
3.0PR16Q1 
alostale
Core
No
0029259: WARN: Datasource request with targetRecordId but without directNavigation detected when reloading Sales Invoice form view
I am able to trigger this warning in the log constantly using the steps written below.


Warning text:
2015-03-12 15:42:23,639 [ajp-localhost%2F127.0.0.1-8809-8] WARN org.openbravo.service.json.DefaultJsonDataService - Datasource request with targetRecordId but without directNavigation detected. This type of requests should be avoided because they result in a query that performs poorly. Parameters: _componentId:isc_OBViewGrid_0
@Invoice.client@:null
@Invoice.posted@:null
_extraProperties:
@Invoice.totalPaid@:null
_constructor:AdvancedCriteria
isc_metaDataPrefix:_
@Invoice.currency@:null
@Invoice.organization@:null
isc_dataFormat:json
_noCount:true
@Invoice.documentType@:null
_startRow:0
_entityName:Invoice
@Invoice.paymentComplete@:null
Constants_IDENTIFIER:_identifier
sendOriginalIDBack:true
_dataSource:isc_OBViewDataSource_0
@Invoice.documentStatus@:null
_targetRecordId:3B5AE17BC3A745578622685FC186CD71
@Invoice.businessPartner@:null
_operationType:fetch
moduleId:0
criteria:{"fieldName":"_dummy","operator":"equals","value":1426171286170}
_className:OBViewDataSource
_noActiveFilter:true
windowId:167
tabId:263
@Invoice.salesTransaction@:null
_endRow:100
_selectedProperties:id,client,organization,updatedBy,updated,creationDate,createdBy,documentNo,invoiceDate,grandTotalAmount,aPRMAddpayment,posted,aPRMProcessinvoice,documentAction,createLinesFrom,copyFrom,updatePaymentMonitor,calculatePromotions,processNow,generateTo,processed,paymentComplete,documentStatus,processed,paymentComplete,organization,invoiceDate,businessPartner,documentStatus,currency,paymentComplete,totalPaid,posted,priceList,documentType,client,id,salesTransaction,client,transactionDocument,id,id,processNow,processed,organization,documentNo,invoiceDate,businessPartner,grandTotalAmount,paymentComplete,currency,totalPaid,outstandingAmount,dueAmount,daysTillDue,percentageOverdue,finalSettlementDate,daysSalesOutstanding,documentStatus
dataSourceName:Invoice
_textMatchStyle:substring
@Invoice.id@:null
operator:and
@Invoice.invoiceDate@:null
_sortBy:documentNo
Constants_FIELDSEPARATOR:$
_where:e.salesTransaction=true and e.documentStatus <> 'TEMP'
isSorting:true
_use_alias:true
@Invoice.priceList@:null
livebuilds.openbravo.com
pi_pg context
Open Window: Sales Invoice
Open a existing row in form view
Now press F5 to reload browser tab

Observe warning in log
Performance
related to design defect 0025811 closed AugustoMauch unnecessary request on grid refresh 
related to defect 0029025 closed caristu In maximized view, the query-list widgets doesn't load the data when it refreshed the browser. 
related to defect 0028321 closed caristu Request without pagination when refreshing the grid 
related to defect 0031434 closed caristu Error thrown when refreshing the grid after canceling the creation of a record in a child tab 
Issue History
2015-03-12 15:45shuehnerNew Issue
2015-03-12 15:45shuehnerAssigned To => AugustoMauch
2015-03-12 15:45shuehnerModules => Core
2015-03-12 15:45shuehnerTriggers an Emergency Pack => No
2015-03-12 15:46alostaleTag Attached: Performance
2015-03-12 15:47alostalePrioritynormal => urgent
2015-03-12 15:47alostaleStatusnew => acknowledged
2015-03-17 14:37alostaleAssigned ToAugustoMauch => platform
2015-11-11 11:37alostalePriorityurgent => normal
2015-11-11 12:51alostaleRelationship addedrelated to 0028321
2015-11-16 12:45alostaleRelationship addedrelated to 0031434
2015-11-23 17:54caristuRelationship addedrelated to 0025811
2015-11-23 17:54caristuRelationship addedrelated to 0029025
2015-11-23 19:34caristuAssigned Toplatform => caristu
2015-11-23 19:34caristuStatusacknowledged => scheduled
2015-11-24 09:40hgbotCheckin
2015-11-24 09:40hgbotNote Added: 0082278
2015-11-24 09:40hgbotStatusscheduled => resolved
2015-11-24 09:40hgbotResolutionopen => fixed
2015-11-24 09:40hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/67bff0d741ded8caecccb0c228d44e62128e06cc [^]
2015-11-24 09:40caristuReview Assigned To => alostale
2015-11-24 09:40caristuIssue Monitored: alostale
2015-11-24 17:27hudsonbotCheckin
2015-11-24 17:27hudsonbotNote Added: 0082305
2015-11-30 11:01alostaleNote Added: 0082465
2015-11-30 11:01alostaleStatusresolved => closed
2015-11-30 11:01alostaleFixed in Version => 3.0PR16Q1

Notes
(0082278)
hgbot   
2015-11-24 09:40   
Repository: erp/devel/pi
Changeset: 67bff0d741ded8caecccb0c228d44e62128e06cc
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue Nov 24 09:37:08 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/67bff0d741ded8caecccb0c228d44e62128e06cc [^]

fixes issue 29259: Request with targetRecordId but without directNavigation

After pressing F5, it was not existing any mechanism to set the directNavigation parameter when refreshing the window. Besides, when closing the form view, the information of the record opened in form view (targetTabId and targetRecordId) was not being deleted from the URL.

Now, after closing the form view, that information is deleted from the URL. This way, if we refresh the window and that information is present in the URL, it means that the request must be done as direct navigation.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-view-manager.js
---
(0082305)
hudsonbot   
2015-11-24 17:27   
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/c776efc2a085 [^]
Maturity status: Test
(0082465)
alostale   
2015-11-30 11:01   
code reviewed

tested:
-Warn is not shown in the log anymore
-After refreshing:
  -Tab is opened in form view with the previously record selected
  -When switching to grid view, this record is prefiltered not showing the rest of the grid, this behavior is correct preventing potentially non slow query