Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0028736Openbravo ERPA. Platformpublic2015-01-22 16:582015-02-09 09:22
caristu 
AugustoMauch 
normalminoralways
closedfixed 
5
pi 
3.0PR15Q23.0PR15Q2 
alostale
Core
No
0028736: Link to parent tree tables displayed in child tabs should be filtered by the selected parent record automatically
Link to parent tree tables displayed in child tabs should be filtered by the selected parent record automatically. Currently it is necessary to configure an HQL where clause using the "HQL Where Clause for root nodes" field.

Notice that AD Tree Node tree structure behaves in this way. For example:

  - In the [Account Tree], the "Element Value" tab is based on an AD Tree Node tree structure table. It does not use the "HQL Where Clause for root nodes" field and the records in the tab are filtered properly when selecting a parent record in the header

  - In the [Cost Adjustment] window, the "Line" tab is based on a Link to parent tree structure. It is making use of the "HQL Where Clause for root nodes" to filter the records by the parent record in the header.
Install the attached patch. It adds a column and a field to the Unit of Measure Transation table and makes it a Link to Parent based tree.

As System Admin:
- Open unit of measure
- Select any record
- Open the tree view of the Translation subtab. Check that all the translations are shown, not only those that belong to the record selected in the header tab.
No tags attached.
causes defect 0028847 closed AugustoMauch Change in method modifier has broken the API 
patch test28736.patch (14,128) 2015-02-02 16:47
https://issues.openbravo.com/file_download.php?file_id=7766&type=bug
Issue History
2015-01-22 16:58caristuNew Issue
2015-01-22 16:58caristuAssigned To => AugustoMauch
2015-01-22 16:58caristuModules => Core
2015-01-22 16:58caristuResolution time => 1428357600
2015-01-22 16:58caristuTriggers an Emergency Pack => No
2015-01-22 16:58caristuIssue Monitored: networkb
2015-01-29 10:34alostaleStatusnew => scheduled
2015-01-29 10:34alostalefix_in_branch => pi
2015-02-02 16:25AugustoMauchIssue Monitored: alostale
2015-02-02 16:25AugustoMauchReview Assigned To => alostale
2015-02-02 16:25AugustoMauchfix_in_branchpi =>
2015-02-02 16:47AugustoMauchFile Added: test28736.patch
2015-02-02 16:48AugustoMauchSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=7583#r7583
2015-02-02 16:49hgbotCheckin
2015-02-02 16:49hgbotNote Added: 0073993
2015-02-02 16:49hgbotStatusscheduled => resolved
2015-02-02 16:49hgbotResolutionopen => fixed
2015-02-02 16:49hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/54caa7a8270a2d5bab573f880d41e6852d37f791 [^]
2015-02-02 16:52hgbotCheckin
2015-02-02 16:52hgbotNote Added: 0073994
2015-02-03 09:01alostaleNote Added: 0074012
2015-02-03 10:33hgbotCheckin
2015-02-03 10:33hgbotNote Added: 0074016
2015-02-03 14:03AugustoMauchRelationship addedcauses 0028847
2015-02-04 20:35hudsonbotCheckin
2015-02-04 20:35hudsonbotNote Added: 0074206
2015-02-04 20:35hudsonbotCheckin
2015-02-04 20:35hudsonbotNote Added: 0074207
2015-02-04 20:35hudsonbotCheckin
2015-02-04 20:35hudsonbotNote Added: 0074211
2015-02-09 09:22alostaleNote Added: 0074267
2015-02-09 09:22alostaleStatusresolved => closed
2015-02-09 09:22alostaleFixed in Version => 3.0PR15Q2

Notes
(0073993)
hgbot   
2015-02-02 16:49   
Repository: erp/devel/pi
Changeset: 54caa7a8270a2d5bab573f880d41e6852d37f791
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Feb 02 16:24:33 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/54caa7a8270a2d5bab573f880d41e6852d37f791 [^]

Fixes issue 28736: Selected record in parent tab criteria is applied to trees

In order to show the proper records in the subtabs, a criteria is applied based on the record selected in the parent tab. This criteria was automatically being added in the trees based
on the ADTree structure, but not in those based on the LinkToParent structure.

Now this criteria is also added in the LinkToParent trees if the following conditions are met:
- The tab is not a header tab
- The tree does not define a HQL clause for root nodes
- The parameters contains the info needed to build the new criteria

The getParentRecordIdFromCriteria method, which was used in the ADTreeDatasourceService for this purpose, has been moved up to TreeDatasourceService so that it can be reused by LinkToPa
rentTreeDatasourceService.

---
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/ADTreeDatasourceService.java
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/LinkToParentTreeDatasourceService.java
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/TreeDatasourceService.java
---
(0073994)
hgbot   
2015-02-02 16:52   
Repository: erp/devel/pi
Changeset: e80c827222a3328818f6e746a15566156a95cae3
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Feb 02 16:50:49 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/e80c827222a3328818f6e746a15566156a95cae3 [^]

Related with issue 28736: Updates copyright year

---
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/ADTreeDatasourceService.java
---
(0074012)
alostale   
2015-02-03 09:01   
Code review:
-missing javadoc in new protected method: TreeDatasourceService.getParentRecordIdFromCriteria
(0074016)
hgbot   
2015-02-03 10:33   
Repository: erp/devel/pi
Changeset: 128a5d39aba2a3e2e979a54f143c31d8fbf83b65
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Feb 03 10:32:54 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/128a5d39aba2a3e2e979a54f143c31d8fbf83b65 [^]

Related with issue 28736: Adds javadoc and final modifier to method

The getParentRecordIdFromCriteria of the TreeDatasourceService is not meant to be overwritten, so the final modifier has been added. The method cannot be made private because it is used by two of the TreeDatasourceService subclasses.

Also, javadoc for this method has been added.

---
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/TreeDatasourceService.java
---
(0074206)
hudsonbot   
2015-02-04 20:35   
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
(0074207)
hudsonbot   
2015-02-04 20:35   
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
(0074211)
hudsonbot   
2015-02-04 20:35   
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
(0074267)
alostale   
2015-02-09 09:22   
code reviewed + tested with attached patch and existent trees in distribution