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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0030403
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminoralways2015-07-22 10:022015-08-20 23:16
ReportercaristuView Statuspublic 
Assigned Tocaristu 
PriorityimmediateResolutionfixedFixed in Version3.0PR15Q4
StatusclosedFix in branchFixed in SCM revisioncd1ddf017185
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression levelPre packaging ( pi )
Regression date2015-07-06
Regression introduced in releasepi
Regression introduced by commithttp://code.openbravo.com/erp/devel/pi/rev/22f85795e81fcad7a6c4c5465ba60d582c69919b [^]
Triggers an Emergency PackNo
Summary

0030403: Unexpected behavior in grid view with OBUISEL_Selector reference when the Display Field is set

DescriptionIs not possible to save a record in grid view if it includes a column with an OBUISEL_Selector reference which is not of custom query type and it has the Display Field set
Steps To ReproduceAs system administrator
1) Go to the [Reference] window, select the "Business Partner selector" reference and navigate to the Defined Selector tab. Set a value for the Display Field, for example Search Key.
2) Go to [Tables and Columns] and change the reference used for the C_BPartner_ID column in the C_Order table, using the "Business partner selector" instead.
As group admin
3) Go to the Sales Order window, try to save a record in grid view.
TagsNo tags attached.
Attached Filespng file icon selectorDisplayFieldSave.png [^] (63,644 bytes) 2015-07-22 10:02


txt file icon selectorDefinition.txt [^] (8,005 bytes) 2015-07-22 13:35 [Show Content]
diff file icon issue30403.diff [^] (2,837 bytes) 2015-07-22 17:49 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00274693.0PR14Q4 closedshankarb Unexpected behavior in OBUISEL_Selector reference when the Display Field is set 
related to defect 00238903.0MP24 closedAugustoMauch Bad behaviour on grid view when searching on a selector field if the selector has defined a diplayed field 
depends on backport 00304043.0PR15Q3 closedcaristu Unexpected behavior in grid view with OBUISEL_Selector reference when the Display Field is set 
depends on backport 00304053.0PR15Q2.3 closedcaristu Unexpected behavior in grid view with OBUISEL_Selector reference when the Display Field is set 
caused by defect 0030297 closedalostale Reference with Search parent reference (old selector) is not working under some circumstances 

-  Notes
(0079028)
caristu (developer)
2015-07-22 13:31
edited on: 2015-07-22 17:50

The problem is that the _extraProperties in the datasource used by the selector does not contain the entity name if they are referencing to the main entity. When trying to set the selected value of the selector picklist in grid view, the display field name was never found as we currently return 'entity$property' as the display field name, instead of looking directly for 'property' when we are using a property that references the main entity on the display field (See attached selectorDefinition.txt).

The solution in issue 0027469 was not the most suitable so the change to fix it in issue 0030297 was correct. Just the attached fix was missing.

This fix has been pushed to try. It has been tested with the following selectors:

- Product (Search reference with FKSelectorUIDefinition UI definition)

- Business Partner selector

- Business Partner (Search reference with FKSelectorUIDefinition UI definition) (is Custom Query, so not affected)

(0079035)
hgbot (developer)
2015-07-22 20:09

Repository: erp/devel/pi
Changeset: cd1ddf017185991943a616cae587cd15f35d3a5a
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Wed Jul 22 17:02:50 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/cd1ddf017185991943a616cae587cd15f35d3a5a [^]

Fixes issue 30403: selectors not working in grid view when display field is set

When setting the display field for a selector with FKSelectorUIDefinition as its UI Definition class, if the display field was referencing to a property of the main entity of the selector, the display field name returned as part of the gridProps in the view definition was 'entity'.
The _extraProperties in the datasource used by the selector does not contain the entity name if they are referencing to the main entity. That is the root of the problem: when trying to set the selected value of the selector picklist in grid view, the display field name was never found as we were using 'entity' instead of looking directly for 'property'.
This problem does not affect when setting as display field a field that references a property which does not belong to the main entity of the selector.
To solve this problem, now in FKSelectorUIDefinition we return 'property' as the display field name instead of 'entity' when the property belongs to the main entity.

---
M modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/reference/FKSelectorUIDefinition.java
---
(0079038)
alostale (developer)
2015-07-23 10:55
edited on: 2015-07-23 11:21

code reviewed

* tested with Search and OBUISEL_Selector references both in grid and form views * tested issue 0030297
* tested issue 0023890

(0079039)
alostale (developer)
2015-07-23 11:22

reopening due to code review:
  private method FKSelectorUIDefinition.getFirstProperty is no longer used after this fix, it should be removed
(0079040)
hgbot (developer)
2015-07-23 11:49

Repository: erp/devel/pi
Changeset: a6b70470ce55d90a19952f163ee69d937cffca2c
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Thu Jul 23 11:47:59 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a6b70470ce55d90a19952f163ee69d937cffca2c [^]

Related to issue 30403: Removed unused getFirstProperty method

---
M modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/reference/FKSelectorUIDefinition.java
---
(0079503)
hudsonbot (developer)
2015-08-20 23:16

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/8c91718397a5 [^]
Maturity status: Test
(0079504)
hudsonbot (developer)
2015-08-20 23:16

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/8c91718397a5 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2015-07-22 10:02 caristu New Issue
2015-07-22 10:02 caristu Assigned To => platform
2015-07-22 10:02 caristu File Added: selectorDisplayFieldSave.png
2015-07-22 10:02 caristu Modules => Core
2015-07-22 10:02 caristu Regression level => Pre packaging ( pi )
2015-07-22 10:02 caristu Regression date => 2015-07-06
2015-07-22 10:02 caristu Regression introduced in release => pi
2015-07-22 10:02 caristu Regression introduced by commit => http://code.openbravo.com/erp/devel/pi/rev/22f85795e81fcad7a6c4c5465ba60d582c69919b [^]
2015-07-22 10:02 caristu Triggers an Emergency Pack => No
2015-07-22 10:03 caristu Assigned To platform => caristu
2015-07-22 10:10 alostale Relationship added caused by 0030297
2015-07-22 10:10 alostale Relationship added related to 0027469
2015-07-22 10:10 alostale Review Assigned To => alostale
2015-07-22 10:11 alostale Status new => scheduled
2015-07-22 13:31 caristu Note Added: 0079028
2015-07-22 13:35 caristu File Added: selectorDefinition.txt
2015-07-22 13:37 caristu Note Edited: 0079028 View Revisions
2015-07-22 13:37 caristu File Added: issue30403.diff
2015-07-22 16:53 caristu Note Edited: 0079028 View Revisions
2015-07-22 17:49 caristu File Deleted: issue30403.diff
2015-07-22 17:49 caristu File Added: issue30403.diff
2015-07-22 17:50 caristu Note Edited: 0079028 View Revisions
2015-07-22 20:08 caristu Issue Monitored: alostale
2015-07-22 20:09 hgbot Checkin
2015-07-22 20:09 hgbot Note Added: 0079035
2015-07-22 20:09 hgbot Status scheduled => resolved
2015-07-22 20:09 hgbot Resolution open => fixed
2015-07-22 20:09 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/cd1ddf017185991943a616cae587cd15f35d3a5a [^]
2015-07-23 10:55 alostale Note Added: 0079038
2015-07-23 10:55 alostale Status resolved => closed
2015-07-23 10:55 alostale Fixed in Version => 3.0PR15Q4
2015-07-23 11:20 alostale Relationship added related to 0023890
2015-07-23 11:21 alostale Note Edited: 0079038 View Revisions
2015-07-23 11:22 alostale Note Added: 0079039
2015-07-23 11:22 alostale Status closed => new
2015-07-23 11:22 alostale Resolution fixed => open
2015-07-23 11:22 alostale Fixed in Version 3.0PR15Q4 =>
2015-07-23 11:49 hgbot Checkin
2015-07-23 11:49 hgbot Note Added: 0079040
2015-07-23 17:30 alostale Status new => scheduled
2015-07-23 17:30 alostale Status scheduled => resolved
2015-07-23 17:30 alostale Fixed in Version => 3.0PR15Q4
2015-07-23 17:30 alostale Resolution open => fixed
2015-07-23 17:30 alostale Status resolved => closed
2015-08-20 23:16 hudsonbot Checkin
2015-08-20 23:16 hudsonbot Note Added: 0079503
2015-08-20 23:16 hudsonbot Checkin
2015-08-20 23:16 hudsonbot Note Added: 0079504


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker