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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0026286
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2014-04-15 14:112014-05-07 18:12
ReporternaiaramartinezView Statuspublic 
Assigned ToAugustoMauch 
PrioritynormalResolutionfixedFixed in Version3.0PR14Q3
StatusclosedFix in branchFixed in SCM revisionde359036d46b
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0026286: Unexpected behaviour when same column name exists in header and lines tab

DescriptionUnexpected behaviour when same column name exists in header and lines tab.

Steps To ReproduceGo to 'windows, tabs a fields' and select Commisions window and commisions lines tab. Select 'C_bPARNER_ID' field and uncheck show in grid view.

Go to tables and columns and select C_Commission table.
select c_bpartner_id column and check as stored in session.

Login as Group admin
create new commision and select a business partner.

Create new commission line and leave bp in blank.
Refresh 'commission line' and notice that bp is now populated with the same BP that is in the header.
Modify any field (that is not the BP) in 'Commission line' tab and save it. Notice that the following error is raised: 'Saving failed. There is a constraint defined that was not satisfied. Please check the data entered'. So, the data in BP has to be removed in order to be able to save the record. If you refresh the tab, check that BP has again the same value that in the header. Check the database and the column is null.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
has duplicate defect 0026369 closednaiaramartinez Modules Service Contract line level Bill is populated and giving a error while save the line 
has duplicate defect 0026708 closedvmromanos Modules Get Constraint error while updating any column in Subscribed Services Tab 

-  Notes
(0066572)
hgbot (developer)
2014-04-24 11:35

Repository: erp/devel/pi
Changeset: de359036d46be34e5f86267664c040bc1a2a9826
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu Apr 24 11:33:41 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/de359036d46be34e5f86267664c040bc1a2a9826 [^]

Fixes issue 26286: Wrong behaviour if same column name exists in tab and subtab

This problem was reproducible if:
- There is a column in a subtab with the same column name as another column in its parent tab
- The column of the parent tab is flagged as stored in session
- The column of the subtab is not shown in the grid
- The value of the record in the subtab has a null value in that column

If all these conditions are met, then when the record in the subtab is opened in the form view, its null value will be replaced with the value of the column of its parent tab.

This bug happens because the FIC does the following:
- It invokes setSessionVariablesInParent. This method stores in the RequestContext the session variables of the parent tab, among others. At this point the stored in session column of the parent tab is stored in the RequestContext
- It invokes setValuesInRequest. This method stores in the RequestContext the values of the row being opened in the form, but only if does it for the values that are not null. In this case, the value is null so it is not stored in the RequestContext, so then when the RequestContext is accessed to fetch the column values, the value stored in the setSessionVariablesInParent method will be returned.

The fix only affects to the FIC calls in EDIT mode. In these calls the actual value of the record should take precedence over the values stored in session.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
---
(0066799)
alostale (manager)
2014-05-05 09:32

Code reviewed + tested
(0066967)
hudsonbot (developer)
2014-05-07 18:12

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

- Issue History
Date Modified Username Field Change
2014-04-15 14:11 naiaramartinez New Issue
2014-04-15 14:11 naiaramartinez Assigned To => AugustoMauch
2014-04-15 14:11 naiaramartinez Modules => Core
2014-04-15 14:11 naiaramartinez Triggers an Emergency Pack => No
2014-04-15 16:34 jonalegriaesarte Resolution time => 1397944800
2014-04-15 17:49 naiaramartinez Steps to Reproduce Updated View Revisions
2014-04-16 18:21 AugustoMauch File Added: issue26286.patch
2014-04-16 18:23 AugustoMauch File Deleted: issue26286.patch
2014-04-16 18:24 AugustoMauch File Added: issue26286.patch
2014-04-22 13:24 AugustoMauch File Deleted: issue26286.patch
2014-04-24 11:33 AugustoMauch Issue Monitored: alostale
2014-04-24 11:34 AugustoMauch Review Assigned To => alostale
2014-04-24 11:35 hgbot Checkin
2014-04-24 11:35 hgbot Note Added: 0066572
2014-04-24 11:35 hgbot Status new => resolved
2014-04-24 11:35 hgbot Resolution open => fixed
2014-04-24 11:35 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/de359036d46be34e5f86267664c040bc1a2a9826 [^]
2014-04-25 10:08 naiaramartinez Relationship added has duplicate 0026369
2014-05-05 09:32 alostale Note Added: 0066799
2014-05-05 09:32 alostale Status resolved => closed
2014-05-05 09:32 alostale Fixed in Version => PR14Q3
2014-05-07 18:12 hudsonbot Checkin
2014-05-07 18:12 hudsonbot Note Added: 0066967
2014-05-28 10:24 naiaramartinez Relationship added has duplicate 0026708


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker