Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0023705
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorhave not tried2013-05-01 11:132013-05-07 15:43
ReporteralostaleView Statuspublic 
Assigned Toalostale 
PriorityimmediateResolutionfixedFixed in Version3.0MP23
StatusclosedFix in branchpiFixed in SCM revision13bebe76e732
ProjectionnoneETAnoneTarget Version3.0MP23
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toshankarb
Web browser
ModulesCore
Regression levelProduction - QA Approved
Regression date2013-03-04
Regression introduced in release
Regression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/f9728bac00aa8157efca54574bed21f0104d8e07 [^]
Triggers an Emergency PackYes
Summary

0023705: Not possible to select a value in drop down filter

DescriptionDrop down combos in grid filter are not populated when they link to a table which identifier is composed by, at least, a reference to another table that is translatable.

In this case when opening the combo "No items to show" message is always shown. Though it is still possible to filter by typing in the text field.

A cast exception is shown in the backend log:

d05203b3 217738 [http-8880-4] ERROR org.openbravo.service.json.DefaultJsonDataService - org.openbravo.model.common.plm.Product cannot be cast to java.lang.String
java.lang.ClassCastException: org.openbravo.model.common.plm.Product cannot be cast to java.lang.String
    at org.openbravo.base.structure.IdentifierProvider.getIdentifier(IdentifierProvider.java:121)
    at org.openbravo.base.structure.IdentifierProvider.getIdentifier(IdentifierProvider.java:77)
    at org.openbravo.base.structure.BaseOBObject.getIdentifier(BaseOBObject.java:195)
    at org.openbravo.base.structure.IdentifierProvider.getIdentifier(IdentifierProvider.java:124)
    at org.openbravo.base.structure.IdentifierProvider.getIdentifier(IdentifierProvider.java:77)
    at org.openbravo.base.structure.BaseOBObject.getIdentifier(BaseOBObject.java:195)

Following query returns (some of) the columns, around 70, that might be affected by this issue:
select tablename, columnname
  from ad_table t1, ad_column c1
 where t1.ad_table_id = c1.ad_table_id
  and c1.iskey = 'N'
  and c1.isparent ='N'
 and
exists (
select 1
  from ad_table reft
  where c1.columnname ilike reft.tablename||'_id'
    and exists (select 1
                  from ad_column c
                  where c.ad_table_id = reft.ad_table_id
                  and c.isidentifier = 'Y'
                  and exists (select 1
                                 from ad_table trl
                                where tablename ilike substr(c.columnname,1,length(c.columnname)-3)||'_trl')))
  and exists (select 1
            from ad_field f, ad_tab tb
            where f.ad_tab_id = tb.ad_tab_id
            and f.isactive = 'Y' and tb.isactive='Y'
            and f.ad_column_id = c1.ad_column_id)
order by 1,2

Steps To Reproduce-Open, for example, Good Transaction window
-Try to open Good Shipment Line drop down in filter -> Error occurs
Proposed SolutionThe problematic line is in IdentifierProvider

value = ((BaseOBObject) dob).get(identifier.getName(), language, (String) dob.get("id"));

In the situation described, dob.get("id") is a BaseOBObject instead of a String.
TagsNo tags attached.
Attached Filespng file icon Selection_163.png [^] (17,914 bytes) 2013-05-01 11:19

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00228363.0MP21 closedshankarb In grid view, unit of measure filter is not translated when the translation pack is installed 
related to design defect 0023706 newTriage Platform Base Invalid BaseOBObject in drop down filter lists 

-  Notes
(0058393)
alostale (manager)
2013-05-01 11:18
edited on: 2013-05-01 11:18

Regression affecting to 3.0MP21, 3.0MP21.1 and 3.0MP22

(0058394)
alostale (manager)
2013-05-01 12:50

Root cause of this issue is due to incorrect BaseOBObjects created for drop down list in filters (see 0023706).

Current fix is temporary till 0023706 is solved. It is done in this way instead of directly fixing root cause, because current fix is less intrusive in a core piece of code.
(0058396)
hgbot (developer)
2013-05-01 12:54

Repository: erp/devel/pi
Changeset: 13bebe76e732bde05939d6003363eebe02b1f881
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed May 01 12:51:36 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/13bebe76e732bde05939d6003363eebe02b1f881 [^]

fixed bug 23705: Not possible to select a value in drop down filter

This is a temporary fix that should be reviewed again when issue 23706 is fixed

---
M src/org/openbravo/base/structure/IdentifierProvider.java
---
(0058398)
hgbot (developer)
2013-05-01 12:54

Repository: erp/devel/pi
Changeset: eb2fcc35a94752232263dfef6b6133aafca9c003
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed May 01 12:53:04 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/eb2fcc35a94752232263dfef6b6133aafca9c003 [^]

related to bug 23706, related to bug 23705

Added comment not to forget to review change for issue 23705 when 23706 is solved

---
M modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java
---
(0058399)
alostale (manager)
2013-05-01 13:02

Provided fix is not risky. In manages the corner case of invalid BaseOBObject when dealing with translatable identifiers. Trying to get a valid id, which was failing, and falling back to behavior previous to 0022836 in case it is not possible.

Tested the regression doesn't appear anymore and that issue 0022836 cannot be reproduced after the fix.
(0058441)
hudsonbot (developer)
2013-05-02 19:03

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/b67b46460127 [^]

Maturity status: Test
(0058444)
hudsonbot (developer)
2013-05-02 19:03

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/b67b46460127 [^]

Maturity status: Test
(0058487)
shankarb (reporter)
2013-05-07 15:41

Code reviewed and tested in pi changeset d17e521df335.
(0058488)
shankarb (reporter)
2013-05-07 15:42

Reopened to update Fixed in version
(0058489)
shankarb (reporter)
2013-05-07 15:43

Code reviewed and tested in pi changeset d17e521df335

- Issue History
Date Modified Username Field Change
2013-05-01 11:13 alostale New Issue
2013-05-01 11:13 alostale Assigned To => alostale
2013-05-01 11:13 alostale Modules => Core
2013-05-01 11:13 alostale Triggers an Emergency Pack => No
2013-05-01 11:17 alostale Regression level => Production - QA Approved
2013-05-01 11:17 alostale Regression date => 2013-03-04
2013-05-01 11:17 alostale Regression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/f9728bac00aa8157efca54574bed21f0104d8e07 [^]
2013-05-01 11:17 alostale Triggers an Emergency Pack No => Yes
2013-05-01 11:17 alostale Relationship added related to 0022836
2013-05-01 11:18 alostale Note Added: 0058393
2013-05-01 11:18 alostale Note Edited: 0058393 View Revisions
2013-05-01 11:19 alostale File Added: Selection_163.png
2013-05-01 11:21 alostale Proposed Solution updated
2013-05-01 12:42 alostale Relationship added related to 0023706
2013-05-01 12:50 alostale Note Added: 0058394
2013-05-01 12:54 hgbot Checkin
2013-05-01 12:54 hgbot Note Added: 0058396
2013-05-01 12:54 hgbot Status new => resolved
2013-05-01 12:54 hgbot Resolution open => fixed
2013-05-01 12:54 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/13bebe76e732bde05939d6003363eebe02b1f881 [^]
2013-05-01 12:54 hgbot Checkin
2013-05-01 12:54 hgbot Note Added: 0058398
2013-05-01 12:56 alostale Review Assigned To => shankarb
2013-05-01 13:02 alostale Note Added: 0058399
2013-05-02 19:03 hudsonbot Checkin
2013-05-02 19:03 hudsonbot Note Added: 0058441
2013-05-02 19:03 hudsonbot Checkin
2013-05-02 19:03 hudsonbot Note Added: 0058444
2013-05-07 15:41 shankarb Note Added: 0058487
2013-05-07 15:41 shankarb Status resolved => closed
2013-05-07 15:41 shankarb Fixed in Version => 3.0MP24
2013-05-07 15:42 shankarb Note Added: 0058488
2013-05-07 15:42 shankarb Status closed => new
2013-05-07 15:42 shankarb Resolution fixed => open
2013-05-07 15:42 shankarb Fixed in Version 3.0MP24 =>
2013-05-07 15:42 shankarb Status new => scheduled
2013-05-07 15:42 shankarb fix_in_branch => pi
2013-05-07 15:43 shankarb Status scheduled => resolved
2013-05-07 15:43 shankarb Resolution open => fixed
2013-05-07 15:43 shankarb Note Added: 0058489
2013-05-07 15:43 shankarb Status resolved => closed
2013-05-07 15:43 shankarb Fixed in Version => 3.0MP23


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker