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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0029314
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 09. Financial managementmajoralways2015-03-17 12:582018-12-11 20:22
ReporterumartirenaView Statuspublic 
Assigned ToAtulOpenbravo 
PrioritynormalResolutionfixedFixed in Version3.0PR19Q1
StatusclosedFix in branchFixed in SCM revision0c740ea71313
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned ToSandrahuguet
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0029314: Clicking select all and after that unselect all records in Credit to Use grid in AddPayment window has performance issues

DescriptionHaving an amount of lines in Credit to Use between 60 and 90 and clicking on select/unselect all causes performance issues.
Steps To ReproduceCreate an amount of Credit Payments between 60 and 90 for a certain business partner.

As F&B Admin:
* Go to Payment In window.
* Create a header and press Add Details.
* Click on select all checkbox. Realize that takes long, if it finishes.
Proposed SolutionImplement a solution similar to the one in this issue: https://issues.openbravo.com/view.php?id=29172 [^]
TagsPerformance
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0029172 closedumartirena Clicking select all and after that unselect all records in AddPayment window induces browser to get stuck 

-  Notes
(0079022)
AtulOpenbravo (developer)
2015-07-22 10:27

Test Plan
- Login as F&B Admin.
- Create around 60 to 90 Credit Payments for any business partner using Payment In window.

Credit Payment

- In Payment In window, select organization, business partner, enter amount.
  For eg:- user business partner "Hoteles Buenas Noches, S.A.".
- Click on add details, Make sure that there is no record selected in Invoice/Order grid, Credit Grid, no entry in G/LItem grid.
- Choose action regarding document as "Process Received Payment(s) and Deposit" and Over Payment Action as "Leave the credit to be used later" and click on done process.
- In this way create 60 - 90 credit payment records in Payment In.

Payment In which uses all previous created credit payments.

- In Payment In window, select organization, business partner as used in credit payment save record.
- Click on add details, In the Credit to User grid Click on select all checkbox. - Realize that it is faster as compare to previous.
- Unselect all check box and check that it is faster as compare to previous.
(0107976)
hgbot (developer)
2018-11-19 12:30

Repository: erp/devel/pi
Changeset: 0c740ea713132252980f8723a36f766da1995006
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Wed Jul 22 10:25:06 2015 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/0c740ea713132252980f8723a36f766da1995006 [^]

Fixes Issue 29314:Clicking select all and after that unselect all records in
Credit to Use grid in AddPayment window has performance issues

The problem was that on every selection/deselection of record in creditUseGrid
it was triggering the execution of these three methods:
* OB.APRM.AddPayment.updateCreditTotal(view.theForm);
* OB.APRM.AddPayment.updateActualExpected(view.theForm);
* OB.APRM.AddPayment.distributeAmount(view, view.theForm, true);

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.

While executing invalidateCache() function to reload CreditUse 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.In order
to avoid this in creditOnLoadGrid function, if the property
'obaprmAllRecordsSelectedByUser' exists, it will be deleted.

---
M modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js
---
(0107977)
hgbot (developer)
2018-11-19 12:30

Repository: erp/devel/pi
Changeset: b08cf6ab13a4c5d26d68448a1bf5b05aa735357d
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Mon Nov 19 12:28:51 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/b08cf6ab13a4c5d26d68448a1bf5b05aa735357d [^]

related to issue 29314 code review: apply formatting

---
M modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js
---
(0107978)
Sandrahuguet (developer)
2018-11-19 12:32

Code review + testing OK
(0108473)
hudsonbot (developer)
2018-12-11 20:22

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/470e3cd384c5 [^]
Maturity status: Test
(0108474)
hudsonbot (developer)
2018-12-11 20:22

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

- Issue History
Date Modified Username Field Change
2015-03-17 12:58 umartirena New Issue
2015-03-17 12:58 umartirena Assigned To => Sandrahuguet
2015-03-17 12:58 umartirena Modules => Core
2015-03-17 12:58 umartirena Triggers an Emergency Pack => No
2015-03-17 12:58 umartirena Relationship added related to 0029172
2015-03-17 12:59 umartirena Tag Attached: Performance
2015-03-17 17:49 umartirena Assigned To Sandrahuguet => umartirena
2015-07-21 08:31 AtulOpenbravo Assigned To umartirena => AtulOpenbravo
2015-07-21 08:31 AtulOpenbravo Status new => scheduled
2015-07-22 10:27 AtulOpenbravo Note Added: 0079022
2018-11-19 12:30 hgbot Checkin
2018-11-19 12:30 hgbot Note Added: 0107976
2018-11-19 12:30 hgbot Status scheduled => resolved
2018-11-19 12:30 hgbot Resolution open => fixed
2018-11-19 12:30 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/0c740ea713132252980f8723a36f766da1995006 [^]
2018-11-19 12:30 hgbot Checkin
2018-11-19 12:30 hgbot Note Added: 0107977
2018-11-19 12:32 Sandrahuguet Review Assigned To => Sandrahuguet
2018-11-19 12:32 Sandrahuguet Note Added: 0107978
2018-11-19 12:32 Sandrahuguet Status resolved => closed
2018-11-19 12:32 Sandrahuguet Fixed in Version => 3.0PR19Q1
2018-12-11 20:22 hudsonbot Checkin
2018-12-11 20:22 hudsonbot Note Added: 0108473
2018-12-11 20:22 hudsonbot Checkin
2018-12-11 20:22 hudsonbot Note Added: 0108474


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker