Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] I. Performancemajorsometimes2015-03-06 13:372015-03-18 18:41
ReporterlorenzofidalgoView Statuspublic 
Assigned Toumartirena 
PrioritynormalResolutionfixedFixed in Version3.0PR15Q2
StatusclosedFix in branchFixed in SCM revisionba035397bf8a
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned ToSandrahuguet
Web browserGoogle Chrome, Mozilla Firefox
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

0029172: Clicking select all and after that unselect all records in AddPayment window induces browser to get stuck

DescriptionIf there is enough lines (I have tested this with 60 and 90 records and it has been successfully reproduced), clicking "select all" records and after that clicking same button (which is "unselect all" at that moment) induces browser to get stuck. [See screenshots].

I have tested this localhost and livebuilds in pi pgsql context.

Steps To Reproduce[It is adviced to create as many puchase invoice records as possible with at least one product line each one and complete them to test this].

Login ERP using QAAdmin role.
Go to "Financial Account" window.
Select "Spain Cashbook" role.
Go to "Transaction" tab.
Create a new record.
Transaction Type: "BP Withdrawal".
Click "+" in Payment field to add a payment.
In "Add Payment" window:
Clear filters.
Click "select all" checkbox and next to that, click it again to "unselect all".
It will probably broke. If it does not, repeat "select all" + "unselect all" several times.
Attached Filesjpg file icon ScriptStopped.jpg [^] (383,007 bytes) 2015-03-06 13:37
png file icon SSCPI.png [^] (296,038 bytes) 2015-03-06 13:39
png file icon SSFFLH.png [^] (196,363 bytes) 2015-03-06 13:40

- Relationships Relation Graph ] Dependency Graph ]
depends on backport 00292643.0PR15Q1.2 closedumartirena Clicking select all and after that unselect all records in AddPayment window induces browser to get stuck 
depends on backport 00292653.0PR14Q3.8 closedumartirena Clicking select all and after that unselect all records in AddPayment window induces browser to get stuck 
has duplicate defect 0029750 closedaferraz Performance problem in AddPaymentDisplayLogicActionHandler 
related to defect 0029314 closedAtulOpenbravo Clicking select all and after that unselect all records in Credit to Use grid in AddPayment window has performance issues 

-  Notes
hgbot (developer)
2015-03-12 18:34

Repository: erp/devel/pi
Changeset: ba035397bf8a35bc05d8cb7f522aa10d09f6f051
Author: Unai Martirena <unai.martirena <at>>
Date: Mon Mar 09 18:58:14 2015 +0100
URL: [^]

Fixes bug 29172: Improved performance select/deselect all records in OrderInv grid

The problem was that on every selection/deselection of a record in Order Invoices grid it was triggering the execution of these three methods: 'OB.APRM.AddPayment.updateInvOrderTotal(view.theForm, orderInvoice), OB.APRM.AddPayment.updateActualExpected(view.theForm), OB.APRM.AddPayment.updateDifference(view.theForm)'.
Actually it is not necessary to execute these functions on every record, because in the end they are updating total values, so just executing them after the iteration of the last record selected/deselected it would be enough.
To implement this, 'userSelectAllRecords' and 'deselectAllRecords' ListGrid methods have been overriden, to set a flag to true, in order to know when a record is changed while clicking selected/deselect all records, and in this case the three methods will be executed in the last record of the grid.
The 'OB.APRM.AddPayment.userSelectAllRecords' is executed only when clicking in select all records checkbox, but 'OB.APRM.AddPayment.deselectAllRecords' is executed while unchecking the previous checkbox and when fetching data in the grid using 'invalidateCache()' method. In this last case these functions will not be executed on every deselection neither in the last record, because they are already invoked directly in 'invalidateCache()', so in this case they will be avoided.

M modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js
hudsonbot (developer)
2015-03-13 03:18

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: [^]
Maturity status: Test
Sandrahuguet (developer)
2015-03-13 13:59

Code review + testing OK
umartirena (developer)
2015-03-18 09:19

Reopened because it does not update differences after reload of Order Invoices grid
umartirena (developer)
2015-03-18 17:17
edited on: 2015-03-18 17:18

Repository: erp/devel/pi
Changeset: f400d595dc526125619530f0d8a725190cece3d1
Author: Unai Martirena <unai.martirena <at>>
Date: Tue Mar 17 20:08:08 2015 +0100
URL: [^]

Related to bug 29172: Delete obaprmAllRecordsSelectedByUser in OrderInvoice Load

While executing invalidateCache() function to reload OrderInvoice grid it internally calls to 'OB.APRM.AddPayment.deselectAllRecords' overriden method that sets obaprmAllRecordsSelectedByUser property to true. This property is only needed when manually the select/unselect all checkbox is clicked.

This was causing on certain scenarios that methods to update totals were not being called:
* OB.APRM.AddPayment.updateInvOrderTotal(view.theForm, orderInvoice);
* OB.APRM.AddPayment.updateActualExpected(view.theForm);
* OB.APRM.AddPayment.updateDifference(view.theForm);

So, in order to avoid this in OrderInvoiceOnLoad function, if the property 'obaprmAllRecordsSelectedByUser' exists, it will be deleted.

M modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js

Sandrahuguet (developer)
2015-03-18 18:41

Code review + testing OK

- Issue History
Date Modified Username Field Change
2015-03-06 13:37 lorenzofidalgo New Issue
2015-03-06 13:37 lorenzofidalgo Assigned To => Sandrahuguet
2015-03-06 13:37 lorenzofidalgo File Added: ScriptStopped.jpg
2015-03-06 13:37 lorenzofidalgo Web browser => Google Chrome, Mozilla Firefox
2015-03-06 13:37 lorenzofidalgo Modules => Core
2015-03-06 13:37 lorenzofidalgo Triggers an Emergency Pack => No
2015-03-06 13:39 lorenzofidalgo Web browser Google Chrome, Mozilla Firefox => Google Chrome, Mozilla Firefox
2015-03-06 13:39 lorenzofidalgo Description Updated View Revisions
2015-03-06 13:39 lorenzofidalgo File Added: SSCPI.png
2015-03-06 13:40 lorenzofidalgo File Added: SSFFLH.png
2015-03-06 14:05 jonalegriaesarte Tag Attached: Performance
2015-03-06 14:47 lorenzofidalgo Web browser Google Chrome, Mozilla Firefox => Google Chrome, Mozilla Firefox
2015-03-06 14:47 lorenzofidalgo Steps to Reproduce Updated View Revisions
2015-03-06 15:58 egoitz Issue Monitored: egoitz
2015-03-10 15:25 Sandrahuguet Assigned To Sandrahuguet => umartirena
2015-03-12 17:10 Sandrahuguet Status new => scheduled
2015-03-12 18:34 hgbot Checkin
2015-03-12 18:34 hgbot Note Added: 0075505
2015-03-12 18:34 hgbot Status scheduled => resolved
2015-03-12 18:34 hgbot Resolution open => fixed
2015-03-12 18:34 hgbot Fixed in SCM revision => [^]
2015-03-13 03:18 hudsonbot Checkin
2015-03-13 03:18 hudsonbot Note Added: 0075516
2015-03-13 13:59 Sandrahuguet Review Assigned To => Sandrahuguet
2015-03-13 13:59 Sandrahuguet Note Added: 0075562
2015-03-13 13:59 Sandrahuguet Status resolved => closed
2015-03-13 13:59 Sandrahuguet Fixed in Version => 3.0PR15Q2
2015-03-17 12:58 umartirena Relationship added related to 0029314
2015-03-18 09:19 umartirena Note Added: 0075715
2015-03-18 09:19 umartirena Status closed => new
2015-03-18 09:19 umartirena Resolution fixed => open
2015-03-18 09:19 umartirena Fixed in Version 3.0PR15Q2 =>
2015-03-18 17:17 umartirena Note Added: 0075746
2015-03-18 17:18 umartirena Note Edited: 0075746 View Revisions
2015-03-18 18:40 Sandrahuguet Status new => scheduled
2015-03-18 18:41 Sandrahuguet Status scheduled => resolved
2015-03-18 18:41 Sandrahuguet Resolution open => fixed
2015-03-18 18:41 umartirena Status resolved => scheduled
2015-03-18 18:41 umartirena Status scheduled => resolved
2015-03-18 18:41 umartirena Fixed in Version => pi
2015-03-18 18:41 Sandrahuguet Note Added: 0075752
2015-03-18 18:41 Sandrahuguet Status resolved => closed
2015-03-18 18:41 Sandrahuguet Fixed in Version pi => 3.0PR15Q2
2015-05-22 14:18 aferraz Relationship added has duplicate 0029750

Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker