Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2020-02-12 16:552020-03-10 15:21
ReportercaristuView Statuspublic 
Assigned Tocaristu 
PriorityhighResolutionfixedFixed in Version3.0PR20Q2
StatusclosedFix in branchFixed in SCM revisioneb2944131bb4
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

0043201: Wrong information displayed in the grid after editing a child record under some circumstances

DescriptionHaving a tab with an HQL where clause with dynamic variables, after editing a child record of that tab a DS request is fired to refresh the "parent" record.

In that case, the HQL where clause is not resolved properly because the context information is not being sent in the parent refresh request. This causes the parent record not to be updated properly and also the grid to show inconsistent information (because some extra request are also being fired, see attached image)

Steps To Reproduce1) Apply the attached patch (hqlWhereClause.diff) which adds a "dynamic" HQL where clause into the "Imported Bank Statements" tab of the [Financial Account] window.
2) Run ant smartbuild -Dlocal=no
3) Go to the [Financial Account] window as F&B group admin
4) Select the "Caja" financial account
5) Switch to the "Imported Bank Statements" tab and create two records
6) Select one of the newly created bank statements and create a new record in the "Bank Statement Lines" for it. ERROR: The record is created but note that the parent tab is refreshed with wrong information. Also the selection is lost.
7) Refresh the "Imported bank Statements" tab to put the grid into a consistent state again
8) Edit the bank statement line created in step 6) and save. ERROR: the record is saved but note that the parent tab has been wrongly refreshed again.
Proposed Solutiona) Send the context information in the parent record refresh request so that the HQL where clause can be properly calculated
b) Do not try to resolve the HQL where clause when refreshing the parent record as filtering by ID should be enough
TagsNo tags attached.
Attached Filespng file icon MultipleDSRequest.png [^] (57,488 bytes) 2020-02-12 16:55

diff file icon hqlWhereClause.diff [^] (1,012 bytes) 2020-02-12 16:57 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
caristu (developer)
2020-03-03 10:08

MR: [^]
hgbot (developer)
2020-03-06 14:59

Repository: erp/devel/pi
Changeset: eb2944131bb41e1cbb6a26111336028dce086f69
Author: Carlos Aristu <carlos.aristu <at>>
Date: Wed Feb 12 17:48:12 2020 +0100
URL: [^]

fixes BUG-43201: Inconsistent grid state after editing a child record

  After editing a child record of a tab that has an HQL where clause
with dynamic variables, the request to refresh the parent record was not
working fine.

  This is because the HQL where clause could not be resolved because the
context information is not sent in this kind of request.

  But in this case we do not need to include the tab HQL where clause at
all, as we want to refresh just the record and that means that we are
going to filter by the record ID.

  Therefore, to fix this issue we are setting the _directNavigation and
_targetRecordId flags to avoid including additional filter clauses in
the request to the DefaultJSONDataService. Thus, in the request built to
refresh the current record we are now filtering just by the record ID.

M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js

- Issue History
Date Modified Username Field Change
2020-02-12 16:55 caristu New Issue
2020-02-12 16:55 caristu Assigned To => platform
2020-02-12 16:55 caristu File Added: MultipleDSRequest.png
2020-02-12 16:55 caristu Modules => Core
2020-02-12 16:55 caristu Triggers an Emergency Pack => No
2020-02-12 16:57 caristu File Added: hqlWhereClause.diff
2020-02-12 16:57 caristu Steps to Reproduce Updated View Revisions
2020-03-03 10:07 caristu Assigned To platform => caristu
2020-03-03 10:07 caristu Review Assigned To => alostale
2020-03-03 10:08 caristu Note Added: 0118285
2020-03-06 14:59 hgbot Checkin
2020-03-06 14:59 hgbot Note Added: 0118404
2020-03-06 14:59 hgbot Status new => resolved
2020-03-06 14:59 hgbot Resolution open => fixed
2020-03-06 14:59 hgbot Fixed in SCM revision => [^]
2020-03-10 15:21 alostale Status resolved => closed
2020-03-10 15:21 alostale Fixed in Version => 3.0PR20Q2

Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker