Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0037363Openbravo ERPA. Platformpublic2017-11-22 15:172018-01-03 12:39
shuehner 
alostale 
urgentminorhave not tried
closedfixed 
5
 
3.0PR18Q1 
caristu
Core
No
0037363: Linked item does not work on Organization window
Opening Linked Items does not work in this specific Window.

Instead of the expected output just the text 'null' is shown.

Instead the following error is logged in the openbravo.log file:
2017-11-22 15:09:22,666 [ajp-bio-127.0.0.1-8009-exec-89] ERROR org.openbravo.erpCommon.utility.UsedByLink - Error getting Categories for windowId: 110 - entity: Organization
java.lang.NullPointerException
    at org.openbravo.erpCommon.utility.UsedByLink.getLinkedTables(UsedByLink.java:692)
    at org.openbravo.erpCommon.utility.UsedByLink.getLinkedItemCategories(UsedByLink.java:364)
    at org.openbravo.erpCommon.utility.UsedByLink.getJSONCategories(UsedByLink.java:278)
    at org.openbravo.erpCommon.utility.UsedByLink.doPost(UsedByLink.java:94)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)

Manually debugging shows:
- current entity in Loop: DoubtfulDebt_ComputedColumns
- current property: DoubtfulDebt_ComputedColumns.organization
- property is not marked as isComputedColumn

- linkedTableId = property.getEntity().getTableId();
  resolves to: "30721072789F410E9606D2235CB2A226_CC"
  which is invalid
  to OBDal.get returns null
  and next line causes the NPE

Probably is already reproducible in 16Q1.3 release
and also in livebuilds with tip of today (2017-11-22)

Open Organization window
Open record "F&B España - Región Norte" in form view
Open Linked items section
No tags attached.
related to defect 0029117 closed alostale The linked items section does not show elments where there is computed column refering to the document. 
caused by design defect 00241043.0MP27 closed alostale Unnecessary evaluation of computed columns 
Issue History
2017-11-22 15:17shuehnerNew Issue
2017-11-22 15:17shuehnerAssigned To => platform
2017-11-22 15:17shuehnerModules => Core
2017-11-22 15:17shuehnerTriggers an Emergency Pack => No
2017-11-22 16:07alostaleRelationship addedrelated to 0029117
2017-11-22 16:09alostaleRelationship addedcaused by 0024104
2017-11-22 16:12alostaleAssigned Toplatform => alostale
2017-11-22 16:12alostaleReview Assigned To => caristu
2017-11-22 16:15hgbotCheckin
2017-11-22 16:15hgbotNote Added: 0100669
2017-11-22 16:15hgbotStatusnew => resolved
2017-11-22 16:15hgbotResolutionopen => fixed
2017-11-22 16:15hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/e90aea5051f274d0cf4438a2824f5c2376cdfa84 [^]
2017-11-23 09:24hgbotCheckin
2017-11-23 09:24hgbotNote Added: 0100678
2017-11-23 12:59hgbotCheckin
2017-11-23 12:59hgbotNote Added: 0100684
2017-11-23 12:59caristuNote Added: 0100685
2017-11-23 12:59caristuStatusresolved => closed
2017-11-23 12:59caristuFixed in Version => 3.0PR18Q1
2018-01-03 12:39hudsonbotCheckin
2018-01-03 12:39hudsonbotNote Added: 0101451
2018-01-03 12:39hudsonbotCheckin
2018-01-03 12:39hudsonbotNote Added: 0101452
2018-01-03 12:39hudsonbotCheckin
2018-01-03 12:39hudsonbotNote Added: 0101453

Notes
(0100669)
hgbot   
2017-11-22 16:15   
Repository: erp/devel/pi
Changeset: e90aea5051f274d0cf4438a2824f5c2376cdfa84
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed Nov 22 16:15:31 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/e90aea5051f274d0cf4438a2824f5c2376cdfa84 [^]

fixed bug 37363: linked items fails in Organization window

  All virtual entities generated for lazy initialization of computed columns include
  client/org properties, causing linked items to fail as they were handled as standard
  windows.

  They are now excluded.

---
M src/org/openbravo/erpCommon/utility/UsedByLink.java
---
(0100678)
hgbot   
2017-11-23 09:24   
Repository: erp/devel/pi
Changeset: 4878d550b906767c183ad191806c8adf94deb9e2
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Nov 23 09:24:29 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/4878d550b906767c183ad191806c8adf94deb9e2 [^]

related with bug 37363: linked items fails in Organization window

  Two minor changes:
    * If any of the queries to retrieve linked items fails, don't stop the whole
      process, just log it and continue with the rest.
    * When looking for available entities, don't iterate over the properties if
      the entity is already known not to be valid.

---
M src/org/openbravo/erpCommon/utility/UsedByLink.java
---
(0100684)
hgbot   
2017-11-23 12:59   
Repository: erp/devel/pi
Changeset: 62bee3798905e8d7528303779ae32317d3b475f3
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Thu Nov 23 12:58:33 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/62bee3798905e8d7528303779ae32317d3b475f3 [^]

related with bug 37363: minor related code improvement

  Use equalsIgnoreCase for the dataOriginType comparison.

---
M src/org/openbravo/erpCommon/utility/UsedByLink.java
---
(0100685)
caristu   
2017-11-23 12:59   
Code reviewed + tested OK.
(0101451)
hudsonbot   
2018-01-03 12:39   
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/c81e0d3cbab5 [^]
Maturity status: Test
(0101452)
hudsonbot   
2018-01-03 12:39   
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/c81e0d3cbab5 [^]
Maturity status: Test
(0101453)
hudsonbot   
2018-01-03 12:39   
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/c81e0d3cbab5 [^]
Maturity status: Test