Project:
| View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | ||||||||
| 0033706 | ||||||||
| Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
| defect | [Openbravo ERP] A. Platform | minor | have not tried | 2016-08-12 17:36 | 2016-08-24 22:47 | |||
| Reporter | shuehner | View Status | public | |||||
| Assigned To | shuehner | |||||||
| Priority | normal | Resolution | fixed | Fixed in Version | 3.0PR16Q4 | |||
| Status | closed | Fix in branch | Fixed in SCM revision | 741a356c2150 | ||||
| Projection | none | ETA | none | Target Version | ||||
| OS | Any | Database | Any | Java version | ||||
| OS Version | Database version | Ant version | ||||||
| Product Version | SCM revision | |||||||
| Merge Request Status | ||||||||
| Review Assigned To | caristu | |||||||
| OBNetwork customer | No | |||||||
| Web browser | ||||||||
| Modules | Core | |||||||
| Support ticket | ||||||||
| Regression level | ||||||||
| Regression date | ||||||||
| Regression introduced in release | ||||||||
| Regression introduced by commit | ||||||||
| Triggers an Emergency Pack | No | |||||||
| Summary | 0033706: SelectorDataSourceFilter does accidental extra queries in 'Add Payment' flow of Sales Orders | |||||||
| Description | This class does some accidental extra queries by calling .list() several time for the same OBCriteria instance. OBCriteria<Parameter> qParam = OBDal.getInstance().createCriteria(Parameter.class); qParam.add(Restrictions.eq(Parameter.PROPERTY_ID, parameters.get(SelectorConstants.DS_REQUEST_SELECTOR_FIELD_ID))); Parameter param = qParam.list().get(0); Validation validation = qParam.list().get(0).getValidation(); if (validation != null) { if (validation.getType().equals("HQL_JS")) { String validationCode = qParam.list().get(0).getValidation().getValidationCode(); Also that code does read parameter via its primary key. So query could instead be just a OBDal.getInstance().get call | |||||||
| Steps To Reproduce | 1.) Create sales order with 1 line and book it. 2.) Open 'Add Payment' via toolbar button 3.) Review extra queries to obuiapp_parameter done in step 2 | |||||||
| Tags | Performance | |||||||
| Attached Files | ||||||||
Relationships [ Relation Graph ]
[ Dependency Graph ]
|
||||||||||||||||||||||
|
||||||||||||||||||||||
Notes |
|
|
(0089304) hgbot (developer) 2016-08-23 14:33 |
Repository: erp/devel/pi Changeset: 741a356c2150eeefa997b0dbbef653349330cd4f Author: Stefan Hühner <stefan.huehner <at> openbravo.com> Date: Fri Aug 12 17:43:20 2016 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/741a356c2150eeefa997b0dbbef653349330cd4f [^] Fixed 33706. Replace triple .list() call by single query. Avoid 2 extra queries by saving .list() result instead of calling it 3 times. Simplify query to OBDal.get (by primary key) as that is only filter which was used in the OBCriteria. --- M modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/SelectorDataSourceFilter.java --- |
|
(0089358) hgbot (developer) 2016-08-24 15:50 |
Repository: erp/devel/pi Changeset: a730e671babce9926f44e0c2b59fd4b474afe693 Author: Carlos Aristu <carlos.aristu <at> openbravo.com> Date: Wed Aug 24 15:49:21 2016 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/a730e671babce9926f44e0c2b59fd4b474afe693 [^] related to issue 33706: code review improvements --- M modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/SelectorDataSourceFilter.java --- |
|
(0089359) caristu (viewer) 2016-08-24 15:51 |
Code review + testing OK: removed extra queries to obuiapp_parameter table |
|
(0089369) hudsonbot (viewer) 2016-08-24 22:47 |
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/badbe5df5566 [^] Maturity status: Test |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2016-08-12 17:36 | shuehner | New Issue | |
| 2016-08-12 17:36 | shuehner | Assigned To | => platform |
| 2016-08-12 17:36 | shuehner | OBNetwork customer | => No |
| 2016-08-12 17:36 | shuehner | Modules | => Core |
| 2016-08-12 17:36 | shuehner | Triggers an Emergency Pack | => No |
| 2016-08-12 17:36 | shuehner | Relationship added | related to 0033704 |
| 2016-08-12 17:38 | shuehner | Description Updated | View Revisions |
| 2016-08-12 18:09 | shuehner | Tag Attached: Performance | |
| 2016-08-12 18:09 | shuehner | Assigned To | platform => shuehner |
| 2016-08-23 14:33 | hgbot | Checkin | |
| 2016-08-23 14:33 | hgbot | Note Added: 0089304 | |
| 2016-08-23 14:33 | hgbot | Status | new => resolved |
| 2016-08-23 14:33 | hgbot | Resolution | open => fixed |
| 2016-08-23 14:33 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/741a356c2150eeefa997b0dbbef653349330cd4f [^] |
| 2016-08-23 14:34 | shuehner | Review Assigned To | => caristu |
| 2016-08-23 14:44 | shuehner | Relationship added | related to 0033767 |
| 2016-08-24 15:50 | hgbot | Checkin | |
| 2016-08-24 15:50 | hgbot | Note Added: 0089358 | |
| 2016-08-24 15:51 | caristu | Note Added: 0089359 | |
| 2016-08-24 15:51 | caristu | Status | resolved => closed |
| 2016-08-24 15:51 | caristu | Fixed in Version | => 3.0PR16Q4 |
| 2016-08-24 22:47 | hudsonbot | Checkin | |
| 2016-08-24 22:47 | hudsonbot | Note Added: 0089369 | |
| 2017-09-19 18:49 | markmm82 | Relationship added | related to 0036898 |
| Copyright © 2000 - 2009 MantisBT Group |