Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0022625Openbravo ERP03. Procurement managementpublic2012-12-19 06:012013-02-20 04:49
sureshbabu 
AugustoMauch 
highmajoralways
closedfixed 
30Professional Appliance
pi 
3.0MP21 
shankarb
Google Chrome
Core
No
0022625: In Purchase order, auto save functionality not working in grid view at header tab.
In purchase order, i insert a new row using Ctrl + I command, and then after i enter business partner details, when i click "Copy Lines" button i am getting the below error

"java.lang.ArrayIndexOutOfBoundsException: 0"
a) Login as Openbravo/openbravo
Change the role to QA Test Admin role
Then navigate to Purchase order window, then click Ctrl + I to insert new row
Select Business Partner as: Vendor A
And without saving the record, click "Copy Lines" button

System throws below error, "java.lang.ArrayIndexOutOfBoundsException: 0"

Note: When i click the Copy lines button once again, Copy Lines from order popup open with out any trouble, and i am not getting the above mentioned error.

b) System throws error message as "Error:ProcessRunError" when the user selects any other details after clicking the "Copy From Order" button.

c) In goods receipt window,when i create a new record in grid view and after entering the Business partner details without saving the record when i click "Create Lines from" option i am getting below error

"Error: Error java.lang.NullPointerException"
No tags attached.
has duplicate defect 0022240 closed AugustoMauch Auto save not working in Payment Out window at grid view 
has duplicate defect 0022278 closed AugustoMauch Null Pointer Exception when opening the Create Lines From window in Goods Receipt 
has duplicate defect 0022050 closed AugustoMauch [Reliability] while creating sales order system throws error java.lang.ArrayIndexOutOfBoundsException: 0 
has duplicate defect 0022052 closed AugustoMauch [Reliability] Sales order after entering the line details, system throws error as Process Run Error 
has duplicate defect 0022038 closed dbaz [Reliability] java.lang.NullPointerException error, when i click Ctrl + Alt +Shift + C (create lines from) in Goods receipt  
has duplicate defect 0022057 closed AugustoMauch [Reliability] system throws error message java.lang.NullPointerException in sales invoice window 
has duplicate defect 0022041 closed AugustoMauch [Reliablity]Purchase invoice, i click Ctlr + Shift + Alt + C (complete button) without entering line items, system throws error 
has duplicate defect 0022067 closed AugustoMauch [Reliability]sales invoice,using "Create lines from" when i try to insert order details having more than one lines. [error mess] 
has duplicate defect 0022039 closed AugustoMauch [Reliability] purchase order, when i try enter the line details through Create line from option, system throws error message 
related to defect 00250723.0PR14Q2 closed AugustoMauch Error message when validating a work effort if the header is created in grid view 
related to defect 0040463 closed caristu UI broken when create a new row and before save clear the filter grid 
diff issue22625.diff (1,050) 2013-02-08 14:46
https://issues.openbravo.com/file_download.php?file_id=5957&type=bug
Issue History
2012-12-19 06:01sureshbabuNew Issue
2012-12-19 06:01sureshbabuAssigned To => dmiguelez
2012-12-19 06:01sureshbabuWeb browser => Google Chrome
2012-12-19 06:01sureshbabuModules => Core
2012-12-19 06:01sureshbabuTriggers an Emergency Pack => No
2012-12-19 06:13sureshbabuWeb browserGoogle Chrome => Google Chrome
2012-12-19 06:13sureshbabuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=4198#r4198
2012-12-19 07:01sureshbabuWeb browserGoogle Chrome => Google Chrome
2012-12-19 07:01sureshbabuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=4199#r4199
2012-12-19 18:49dmiguelezAssigned Todmiguelez => dbaz
2012-12-20 17:35dbazAssigned Todbaz => shankarb
2012-12-26 06:23shankarbIssue Monitored: AugustoMauch
2012-12-26 06:24shankarbReview Assigned To => AugustoMauch
2012-12-26 06:24shankarbWeb browserGoogle Chrome => Google Chrome
2012-12-26 06:24shankarbStatusnew => scheduled
2012-12-26 06:24shankarbfix_in_branch => pi
2012-12-26 06:24hgbotCheckin
2012-12-26 06:24hgbotNote Added: 0055185
2012-12-26 06:24hgbotStatusscheduled => resolved
2012-12-26 06:24hgbotResolutionopen => fixed
2012-12-26 06:24hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/faf2790df3d255b0277e89718cc025aa96d68d12 [^]
2012-12-26 08:19hgbotCheckin
2012-12-26 08:19hgbotNote Added: 0055188
2012-12-26 15:43hudsonbotCheckin
2012-12-26 15:43hudsonbotNote Added: 0055214
2012-12-27 14:28hgbotCheckin
2012-12-27 14:28hgbotNote Added: 0055246
2013-01-02 11:03AugustoMauchNote Added: 0055302
2013-01-02 11:03AugustoMauchStatusresolved => new
2013-01-02 11:03AugustoMauchResolutionfixed => open
2013-01-03 13:11hudsonbotCheckin
2013-01-03 13:11hudsonbotNote Added: 0055320
2013-01-03 13:12hudsonbotCheckin
2013-01-03 13:12hudsonbotNote Added: 0055329
2013-01-09 10:23hgbotCheckin
2013-01-09 10:23hgbotNote Added: 0055406
2013-01-09 10:23hgbotCheckin
2013-01-09 10:23hgbotNote Added: 0055407
2013-01-09 18:04hudsonbotCheckin
2013-01-09 18:04hudsonbotNote Added: 0055432
2013-01-09 18:04hudsonbotCheckin
2013-01-09 18:04hudsonbotNote Added: 0055433
2013-02-08 14:46AugustoMauchFile Added: issue22625.diff
2013-02-08 16:58AugustoMauchNote Added: 0056306
2013-02-08 16:58AugustoMauchStatusnew => scheduled
2013-02-08 17:04AugustoMauchRelationship addedhas duplicate 0022240
2013-02-09 07:57shankarbAssigned Toshankarb => AugustoMauch
2013-02-11 13:10AugustoMauchRelationship addedduplicate of 0022278
2013-02-11 13:36AugustoMauchRelationship deleted0022278
2013-02-11 13:36AugustoMauchRelationship addedhas duplicate 0022278
2013-02-11 16:26AugustoMauchIssue Monitored: shankarb
2013-02-11 16:26AugustoMauchReview Assigned ToAugustoMauch => shankarb
2013-02-11 16:26AugustoMauchWeb browserGoogle Chrome => Google Chrome
2013-02-11 16:26AugustoMauchfix_in_branchpi =>
2013-02-11 16:51hgbotCheckin
2013-02-11 16:51hgbotNote Added: 0056340
2013-02-11 16:51hgbotStatusscheduled => resolved
2013-02-11 16:51hgbotResolutionopen => fixed
2013-02-11 16:51hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/faf2790df3d255b0277e89718cc025aa96d68d12 [^] => http://code.openbravo.com/erp/devel/pi/rev/23f36f89bcf27986a40cc66c4f85b32fba526072 [^]
2013-02-12 12:21shankarbNote Added: 0056371
2013-02-12 12:21shankarbStatusresolved => closed
2013-02-12 12:21shankarbFixed in Version => 3.0MP21
2013-02-20 04:49hudsonbotCheckin
2013-02-20 04:49hudsonbotNote Added: 0056564
2013-03-05 18:19AugustoMauchRelationship addedhas duplicate 0022050
2013-03-05 18:22AugustoMauchRelationship addedhas duplicate 0022052
2013-03-05 18:23AugustoMauchRelationship addedhas duplicate 0022038
2013-03-05 18:26AugustoMauchRelationship addedhas duplicate 0022057
2013-03-06 11:05AugustoMauchRelationship addedhas duplicate 0022041
2013-03-06 11:05AugustoMauchRelationship addedhas duplicate 0022067
2013-03-06 11:10AugustoMauchRelationship addedhas duplicate 0022039
2013-11-04 17:50caristuRelationship addedrelated to 0025072
2019-05-29 18:02caristuRelationship addedrelated to 0040463

Notes
(0055185)
hgbot   
2012-12-26 06:24   
Repository: erp/devel/pi
Changeset: faf2790df3d255b0277e89718cc025aa96d68d12
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Wed Dec 26 10:35:08 2012 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/faf2790df3d255b0277e89718cc025aa96d68d12 [^]

Fixes Issue 0022625: Issue in auto save in grid view

When a process that is executed for an unsaved record in grid view tries to access the record an error is generated because the process is executed before saving the record. Modified code to save and then execute the process.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js
---
(0055188)
hgbot   
2012-12-26 08:19   
Repository: erp/devel/pi
Changeset: a9605441d9c9ffcf76eaef82dfec97efeb20cbd5
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Wed Dec 26 12:46:11 2012 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/a9605441d9c9ffcf76eaef82dfec97efeb20cbd5 [^]

Related to Issue 22625 : Issue in auto save in grid view.

The earlier fix does not work for the case where the record is the first record of the grid. This is because rowNum is compared, but it fails if the rowNum value is 0. Modified the check constraint to ignore null values alone.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-action-button.js
---
(0055214)
hudsonbot   
2012-12-26 15:43   
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/631fc2e1c525 [^]

Maturity status: Test
(0055246)
hgbot   
2012-12-27 14:28   
Repository: erp/devel/pi
Changeset: 3a21b44068143119228e58ad6ad64fadc1a0fa89
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Thu Dec 27 18:53:32 2012 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/3a21b44068143119228e58ad6ad64fadc1a0fa89 [^]

Related to Issue 22625: Using smartclient method to check for number inputs

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-action-button.js
---
(0055302)
AugustoMauch   
2013-01-02 11:03   
The fix is not proper. The new code to save the row has been placed in a function that is called after the autosave has been done, instead of fixing the autosave itself.
(0055320)
hudsonbot   
2013-01-03 13:11   
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/792728467ed0 [^]

Maturity status: Test
(0055329)
hudsonbot   
2013-01-03 13: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/792728467ed0 [^]

Maturity status: Test
(0055406)
hgbot   
2013-01-09 10:23   
Repository: erp/devel/pi
Changeset: 07560f9523e0a6299fe838958c73840a895bc4c1
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Wed Jan 09 14:49:50 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/07560f9523e0a6299fe838958c73840a895bc4c1 [^]

Related to issue 22625 : Backout Changeset faf2790df3d2

Backed out changeset as it the changeset gets called at various other instances like switching over tabs.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js
---
(0055407)
hgbot   
2013-01-09 10:23   
Repository: erp/devel/pi
Changeset: 005e47a80a3178c30c11ff0fc53fdb3e3f196d6f
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Wed Jan 09 14:50:48 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/005e47a80a3178c30c11ff0fc53fdb3e3f196d6f [^]

Related to issue 22625 : Backout Changeset 3a21b4406814

Backed out changeset as it the changeset gets called at various other instances
like switching over tabs.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-action-button.js
---
(0055432)
hudsonbot   
2013-01-09 18:04   
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/314b62ac40f7 [^]

Maturity status: Test
(0055433)
hudsonbot   
2013-01-09 18:04   
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/314b62ac40f7 [^]

Maturity status: Test
(0056306)
AugustoMauch   
2013-02-08 16:58   
A patch for this issue has been attached. It will be pushed to pi once it is unfrozen for MP21 issues
(0056340)
hgbot   
2013-02-11 16:51   
Repository: erp/devel/pi
Changeset: 23f36f89bcf27986a40cc66c4f85b32fba526072
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Feb 11 16:49:32 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/23f36f89bcf27986a40cc66c4f85b32fba526072 [^]

Fixes issue 22625: Fixes autosave in grid for new records

The problem was that the new and proper record id (which is not available until the row has been saved in the database) was already available when the context info was retrieved, but was being overwritten by the old dummy in this line [1]. This happened because the old id was not being cleared, due to the fact that smartclient does not clear the values of the primary keys [2].

This is fixed by replacing the dummy id with the proper one if:
- The id returned by viewGrid.getEditValues (old one) begins with '_' (is dummy)
- The id returned by viewGrid.getRecord (new one) does not begin with '_' (is not dummy)

[1] https://code.openbravo.com/erp/devel/pi/file/fe46ee66e77a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js#l1993 [^]
[2] https://code.openbravo.com/erp/mods/org.openbravo.userinterface.smartclient.dev/file/8c2bc26694da/web/org.openbravo.userinterface.smartclient/isomorphic/client/widgets/ListGrid.js#l28859 [^]

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
---
(0056371)
shankarb   
2013-02-12 12:21   
Code reviwed and verified in pi changeset 5265a23b7dbe
(0056564)
hudsonbot   
2013-02-20 04:49   
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/d828167a9e83 [^]

Maturity status: Test