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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0026820
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajoralways2014-06-10 10:082014-06-12 16:41
ReportercaristuView Statuspublic 
Assigned ToAugustoMauch 
PriorityimmediateResolutionfixedFixed in Version3.0PR14Q3
StatusclosedFix in branchFixed in SCM revision5e171f9e8353
ProjectionnoneETAnoneTarget Version3.0PR14Q3
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned Toshankarb
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0026820: Unexpected behavior using an obuisel_selector reference with the id as display field

DescriptionIf we configure an obuisel_selector reference and put the id of the referenced table as display field, then unexpected behavior occurs when saving a record with this reference:

 - A new empty record is shown when saving the first time
 - The second time, the save operation doesn't finish
Steps To ReproduceAs system role:
1) Create a new obuisel_selector reference with the following information:
   - Table: any
   - Value field: ID
   - Create field: ID
   - Selector Template

  where ID is a selector field referencing the id property of the table.

2) Assign this reference to a new column of a table
3) Create the field for this column
As group admin role:
4) Go to the window which contains the new column
5) Save a new record in grid view
Proposed SolutionThe source of the problem is that the column that uses that reference is being considered as primary key for the table. This is causing that an additional wrong object is being created in the localData object of the grid.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0067848)
hgbot (developer)
2014-06-10 15:20

Repository: erp/devel/pi
Changeset: 5e171f9e8353a8356f006b19a1a38c72943b6b3f
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Jun 10 15:19:07 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/5e171f9e8353a8356f006b19a1a38c72943b6b3f [^]

Fixes issue 26820: Additional properties should not be used as primary keys.

When setting the primary keys of a datasource, its additional properties should not be taken into account. Only those that belong to the main entity should be considered.

For instance, consider the following case. The SalesInvoiceLine entity has a product property, which uses a selector reference. The field used as the Display Field of the selector will be added to the additional properties of SalesInvoiceLine. If the product.id property were used as Display Field, then it would be added to the additional properties, but should not be considered a primary key for SalesInvoiceLine even though that property is a primary key in its referenced entity.

---
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/templates/datasource.ftl
---
(0067915)
shankarb (developer)
2014-06-12 07:57

Code reviewed and verified in pi changeset b4ba48792e48.
(0067958)
hudsonbot (developer)
2014-06-12 16:41

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

- Issue History
Date Modified Username Field Change
2014-06-10 10:08 caristu New Issue
2014-06-10 10:08 caristu Assigned To => AugustoMauch
2014-06-10 10:08 caristu Modules => Core
2014-06-10 10:08 caristu Triggers an Emergency Pack => No
2014-06-10 10:08 caristu Issue Monitored: networkb
2014-06-10 10:08 caristu version => pi
2014-06-10 10:08 caristu Target Version => PR14Q3
2014-06-10 10:09 caristu Reproducibility have not tried => always
2014-06-10 14:20 johnfandl Issue Monitored: johnfandl
2014-06-10 15:19 AugustoMauch Issue Monitored: shankarb
2014-06-10 15:19 AugustoMauch Review Assigned To => shankarb
2014-06-10 15:20 hgbot Checkin
2014-06-10 15:20 hgbot Note Added: 0067848
2014-06-10 15:20 hgbot Status new => resolved
2014-06-10 15:20 hgbot Resolution open => fixed
2014-06-10 15:20 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/5e171f9e8353a8356f006b19a1a38c72943b6b3f [^]
2014-06-12 07:57 shankarb Note Added: 0067915
2014-06-12 07:57 shankarb Status resolved => closed
2014-06-12 07:57 shankarb Fixed in Version => PR14Q3
2014-06-12 16:41 hudsonbot Checkin
2014-06-12 16:41 hudsonbot Note Added: 0067958


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker