Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0028499Openbravo ERPA. Platformpublic2014-12-29 17:152015-02-04 20:33
AugustoMauch 
AugustoMauch 
normalminorhave not tried
closedfixed 
5
 
3.0PR15Q1 
alostale
Core
No
0028499: Opening a link using the QuickView does not fetch properly the link parameters
When a window is open by entering a link in the Quick View, the parameters of the link are not obtained properly. Because of this, some features do not work properly (i.e. using a link that contains the grid criteria).

The problem is that the OB.Utilities.openDirectab function, which is used to open a view using the Quick View and also when an URL is pasted in the address bar, tries to fetch the parameters from the URL. If the link has been entered in the Quick View the parameters won't be available in the URL, whereas if the view is opened by entering the URL in the address window the view will be opened properly.
- Open the Unit of Measure window
- Enter an 'a' in the Name column filter editor. Check that the grid is filtered.
- Obtain the direct link by pressing the proper toolbar button. It will look something like this [1]. Copy the link in the clipboard.
- Close the window.
- Paste the link in the Quick View and press enter. The Unit of Measure window will be opened but no criteria will be applied, this is wrong.
- Paste the link in the address bar and press enter. The Unit of Measure window will be opened and the proper criteria will be applied to the grid.

[1] http://127.0.0.1:9080/openbravo/?tabId=133&criteria=%7B%22operator%22%3A%22and%22%2C%22_constructor%22%3A%22AdvancedCriteria%22%2C%22criteria%22%3A%5B%7B%22fieldName%22%3A%22name%22%2C%22operator%22%3A%22iContains%22%2C%22value%22%3A%22a%22%2C%22_constructor%22%3A%22AdvancedCriteria%22%7D%5D%7D [^]
No tags attached.
related to defect 0024577 closed AugustoMauch "Direct link url which contains explicit criteria" does not work in case of "implicit filter" or "default view" on the window 
? issue28499.export (3,559) 2014-12-29 18:41
https://issues.openbravo.com/file_download.php?file_id=7644&type=bug
Issue History
2014-12-29 17:15AugustoMauchNew Issue
2014-12-29 17:15AugustoMauchAssigned To => AugustoMauch
2014-12-29 17:15AugustoMauchModules => Core
2014-12-29 17:15AugustoMauchTriggers an Emergency Pack => No
2014-12-29 17:15AugustoMauchRelationship addedrelated to 0024577
2014-12-29 17:20jonalegriaesarteResolution time => 1419980400
2014-12-29 17:39AugustoMauchSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=7360#r7360
2014-12-29 18:41AugustoMauchFile Added: issue28499.export
2014-12-29 18:43AugustoMauchNote Added: 0072861
2014-12-29 18:43AugustoMauchStatusnew => scheduled
2014-12-29 18:43AugustoMauchfix_in_branch => pi
2015-01-05 11:57AugustoMauchIssue Monitored: alostale
2015-01-05 11:57AugustoMauchReview Assigned To => alostale
2015-01-05 11:57AugustoMauchfix_in_branchpi =>
2015-01-05 12:00hgbotCheckin
2015-01-05 12:00hgbotNote Added: 0073304
2015-01-05 12:00hgbotStatusscheduled => resolved
2015-01-05 12:00hgbotResolutionopen => fixed
2015-01-05 12:00hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/e47640ded61fd1e78c4520b857482d66048d1bbc [^]
2015-01-12 12:12alostaleNote Added: 0073416
2015-01-12 12:12alostaleStatusresolved => closed
2015-01-12 12:12alostaleFixed in Version => 3.0PR15Q1
2015-02-04 20:33hudsonbotCheckin
2015-02-04 20:33hudsonbotNote Added: 0074104

Notes
(0072861)
AugustoMauch   
2014-12-29 18:43   
A fix has been attached to the issue. It will not be pushed to pi until it is open for changesets targeting PR15Q2.
(0073304)
hgbot   
2015-01-05 12:00   
Repository: erp/devel/pi
Changeset: e47640ded61fd1e78c4520b857482d66048d1bbc
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Dec 29 18:40:27 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/e47640ded61fd1e78c4520b857482d66048d1bbc [^]

Fixes bug 28499:Proper params are used when opening a link using the quick view

The problem was that the OB.Utilities.openDirecTab function, which is used to open a view using the Quick View and also when an URL is pasted in the address bar, tries to fetch the parameters from the current address bar URL. If the link has been entered in the Quick View the parameters won't be available in the address bar, whereas if the view is opened by entering the URL in the address window the view will be opened properly.

This has been fixed by adding the urlParams as an optional parameter to the openDirectTab function. If the parameter is not passed to the function then it will work as usual and it will take its values from the address bar. When the function is called from the quick view the proper parameters are passed, so in this case the url params are not taken from the address bar.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/navbar/ob-quick-launch.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js
---
(0073416)
alostale   
2015-01-12 12:12   
code reviewed

tested:
-applying link to url
-applying link to quick launch
-repeating tests for 0024577
(0074104)
hudsonbot   
2015-02-04 20:33   
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/f36c91d0ad63 [^]
Maturity status: Test