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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0020398
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajoralways2012-05-03 10:292012-05-28 10:10
ReporterAugustoMauchView Statuspublic 
Assigned Todbaz 
PriorityurgentResolutionfixedFixed in Version3.0MP12
StatusclosedFix in branchFixed in SCM revisionfd786ec8e05c
ProjectionnoneETAnoneTarget Version3.0MP12
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision4a98ad8c57f0 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0020398: Wrong buttons are shown when creating a new row in grid

DescriptionWhen a new row is created in the grid by pushing the "Insert row" button with any other line previusly selected, the buttons placed in the left part of the record are "Click to open the record in a form" and the "Click to edit the record in the grid", instead of "Click to cancel your changes" and "Click to save your changes in the database".
Steps To Reproduce- Open any window
- Select any row
- Create a new row in the grid using the "Insert row" button
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
has duplicate defect 0020401 closedalostale Edited line cannot be saved 

-  Notes
(0048344)
dbaz (developer)
2012-05-03 16:17

The problem is here

https://code.openbravo.com/erp/devel/pi/file/18676afefe0c/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js#l2302 [^]

And the source of the problem is quite strange

If before this line we do
  console.log(record);
  console.log(record.editColumnLayout);

we see that the first one returns an object and the second one is "undefined". But, if we unfold this record object, we see that "editColumnLayout" is there!!

If we do this
  var recordClone = {};
  for(var k in recordClone) recordClone [k]=record[k];
  console.log(record);
  console.log(recordClone);
we see that in fact, recordClone has less items that record (including editColumnLayout).

It is strange, it seems that there is any kind of delay here
  var record = this.getRecord(rowNum);
and the data is not instantly retrived.


Replacing this
  if (record && record.editColumnLayout) {
    record.editColumnLayout.showSaveCancel();
  }

by this
  setTimeout(function() {
    if (record && record.editColumnLayout) {
      record.editColumnLayout.showSaveCancel();
    }
   }, 1);

the issue would be solved, but a big research should be done in order to determine why the "getRecord" function has this strange delay.
(0048348)
dbaz (developer)
2012-05-03 16:49

Maybe this is somehow related:
https://code.openbravo.com/erp/devel/pi/file/18676afefe0c/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js#l1862 [^]
(0048349)
dbaz (developer)
2012-05-03 16:50

The setTimeout solution is going to be pushed as a "temporary" fix, in order to avoid noise and some people reporting the same thing.

Once a proper solution be implemented, this temporary fix should be reverted.
(0048351)
hgbot (developer)
2012-05-03 16:51

Repository: erp/devel/pi
Changeset: d11d7ecffa6f630c1047ce798aac7bdf3f6f9c16
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Thu May 03 16:51:23 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/d11d7ecffa6f630c1047ce798aac7bdf3f6f9c16 [^]

Related to issue 20398: Temporary fix
- Read the issue comments to get all the information

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
(0048423)
hgbot (developer)
2012-05-07 21:38

Repository: erp/devel/pi
Changeset: fd786ec8e05c5ea5457f6866b80fe56a1a0c2e0d
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Mon May 07 21:38:24 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/fd786ec8e05c5ea5457f6866b80fe56a1a0c2e0d [^]

Fixes issue 20398: Wrong buttons are shown when creating a new row in grid
Set the record component in the correct state for a new record, when
the record component gets created/re-used.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
(0049014)
hudsonbot (developer)
2012-05-25 12:09

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

Maturity status: Test
(0049043)
hudsonbot (developer)
2012-05-25 12:10

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

Maturity status: Test
(0049338)
AugustoMauch (manager)
2012-05-28 10:10

Code reviewed and verified in pi@520938516719

- Issue History
Date Modified Username Field Change
2012-05-03 10:29 AugustoMauch New Issue
2012-05-03 10:29 AugustoMauch Assigned To => dbaz
2012-05-03 10:29 AugustoMauch Modules => Core
2012-05-03 13:15 AugustoMauch Relationship added has duplicate 0020401
2012-05-03 16:17 dbaz Note Added: 0048344
2012-05-03 16:49 dbaz Note Added: 0048348
2012-05-03 16:50 dbaz Note Added: 0048349
2012-05-03 16:51 hgbot Checkin
2012-05-03 16:51 hgbot Note Added: 0048351
2012-05-03 17:06 dbaz Description Updated View Revisions
2012-05-03 17:06 dbaz Steps to Reproduce Updated View Revisions
2012-05-07 21:38 hgbot Checkin
2012-05-07 21:38 hgbot Note Added: 0048423
2012-05-07 21:38 hgbot Status new => resolved
2012-05-07 21:38 hgbot Resolution open => fixed
2012-05-07 21:38 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/fd786ec8e05c5ea5457f6866b80fe56a1a0c2e0d [^]
2012-05-25 12:09 hudsonbot Checkin
2012-05-25 12:09 hudsonbot Note Added: 0049014
2012-05-25 12:10 hudsonbot Checkin
2012-05-25 12:10 hudsonbot Note Added: 0049043
2012-05-28 10:10 AugustoMauch Note Added: 0049338
2012-05-28 10:10 AugustoMauch Status resolved => closed
2012-05-28 10:10 AugustoMauch Fixed in Version => 3.0MP12


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker