Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029117Openbravo ERPA. Platformpublic2015-03-03 18:212015-03-06 16:04
egoitz 
alostale 
immediatemajoralways
closedfixed 
5
 
3.0PR15Q2 
AugustoMauch
Core
No
0029117: The linked items section does not show elments where there is computed column refering to the document.
When opening the linked items section, if there is a computed column on other table refering to the table used by the tab you are in, you don't get any result
-Create a new module with a prefix
-Create a new column as computed column on the greeting table. ON the sql logic define a query to get the m_product_id of an existing product.
-Define the reference as table and reference search key as m_product
-Compile and restart tomcat
-Go to the product window and on a product open the section linked items.
NOthing is shown.

It fails on method.
getLinkedTables from UsedByLink.java class but you don't get a error becuase there is not catch.

Attached a obx with an example.
You should change the sql locig of the new column to get an existing m_product_id because it is hardoced
No tags attached.
related to defect 0037363 closed alostale Linked item does not work on Organization window 
? com.openbravo.support.linked-0.0.1.obx (3,226) 2015-03-03 18:21
https://issues.openbravo.com/file_download.php?file_id=7847&type=bug
Issue History
2015-03-03 18:21egoitzNew Issue
2015-03-03 18:21egoitzAssigned To => AugustoMauch
2015-03-03 18:21egoitzFile Added: com.openbravo.support.linked-0.0.1.obx
2015-03-03 18:21egoitzModules => Core
2015-03-03 18:21egoitzResolution time => 1426374000
2015-03-03 18:21egoitzTriggers an Emergency Pack => No
2015-03-03 18:49extraIssue Monitored: extra
2015-03-04 18:03egoitzPriorityurgent => immediate
2015-03-04 18:09egoitzResolution time1426374000 => 1425942000
2015-03-05 15:52hgbotCheckin
2015-03-05 15:52hgbotNote Added: 0075200
2015-03-05 16:06alostaleStatusnew => scheduled
2015-03-05 16:06alostaleAssigned ToAugustoMauch => alostale
2015-03-05 16:06alostaleReview Assigned To => AugustoMauch
2015-03-05 16:07alostaleNote Added: 0075202
2015-03-05 16:09hgbotCheckin
2015-03-05 16:09hgbotNote Added: 0075203
2015-03-05 16:09hgbotStatusscheduled => resolved
2015-03-05 16:09hgbotResolutionopen => fixed
2015-03-05 16:09hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a410732b5a7f7f8c989c5f524cd3727f9a7fb1d5 [^]
2015-03-06 13:09AugustoMauchNote Added: 0075243
2015-03-06 13:09AugustoMauchStatusresolved => closed
2015-03-06 13:09AugustoMauchFixed in Version => 3.0PR15Q2
2015-03-06 16:04hudsonbotCheckin
2015-03-06 16:04hudsonbotNote Added: 0075254
2017-11-22 16:07alostaleRelationship addedrelated to 0037363

Notes
(0075200)
hgbot   
2015-03-05 15:52   
Repository: erp/mods/com.openbravo.support.test
Changeset: 12315a4bdfac687a6e6670d1321c88406f467efc
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Mar 05 15:52:19 2015 +0100
URL: http://code.openbravo.com/erp/mods/com.openbravo.support.test/rev/12315a4bdfac687a6e6670d1321c88406f467efc [^]

added computed column in greeting table to reproduce issue 29117

---
M src-db/database/sourcedata/AD_COLUMN.xml
---
(0075202)
alostale   
2015-03-05 16:07   
Computed column provided in attached obx can be found also in com.openbravo.support.test module.
(0075203)
hgbot   
2015-03-05 16:09   
Repository: erp/devel/pi
Changeset: a410732b5a7f7f8c989c5f524cd3727f9a7fb1d5
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Mar 05 16:04:13 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/a410732b5a7f7f8c989c5f524cd3727f9a7fb1d5 [^]

fixed bug 29117: empty linked items if computed column points current entity

  Linked items section didn't receive any row and remained in "loading data" state
  when a computed column in any entity linked to the entity the section was used in.

  The problem was caused by an error when trying to deal with computed column in
  linked items. No error was shown nor in UI nor in openbravo.log.

  This fix:
   - Adds log in openbravo.log including stack trace in case of error computing
     linked items
   - NPE getMessage is null which caused not to be shown in the UI, it is casted
     to String
   - Computed Columns are properly ignored in linked items

  IMPORTANT NOTE: Computed Columns cannot be evaluated in linked items so they
                  are ignored

---
M src/org/openbravo/erpCommon/utility/UsedByLink.java
---
(0075243)
AugustoMauch   
2015-03-06 13:09   
Code reviewed and verified in pi@486e7700e8d0
(0075254)
hudsonbot   
2015-03-06 16:04   
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/1601137b3c3d [^]
Maturity status: Test