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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0033583
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSminorhave not tried2016-08-01 18:542018-02-28 17:55
ReportershuehnerView Statuspublic 
Assigned ToSandrahuguet 
PrioritynormalResolutionfixedFixed in VersionRR18Q2
StatusclosedFix in branchFixed in SCM revisiondba7db40d9b1
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomarvintm
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0033583: OrderLoader does double query for ad_user related to a bp

DescriptionOrderLoader does double query in this code here to first check -> are any related contacts + then query again to find the first contact in the list.

Should be optimized to do a single query only to cover both topics

    if (!bp.getADUserList().isEmpty()) {
      String userHqlWhereClause = " usr where usr.businessPartner = :bp and usr.organization.id in (:orgs) order by username";
      OBQuery<User> queryUser = OBDal.getInstance().createQuery(User.class, userHqlWhereClause);

Steps To ReproduceTrace queries done by that part of the code in OrderLoader.java

Rewrite to not use 2 queries.

I.e. only use 2nd query.
TagsPerformance
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0102862)
hgbot (developer)
2018-02-28 08:42

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: dba7db40d9b1056a066deec5be60fe31028dc83f
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Wed Feb 07 13:21:09 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/dba7db40d9b1056a066deec5be60fe31028dc83f [^]

Fixed issue 33583 is not necessary to check related contacts

---
M src/org/openbravo/retail/posterminal/OrderLoader.java
---

- Issue History
Date Modified Username Field Change
2016-08-01 18:54 shuehner New Issue
2016-08-01 18:54 shuehner Assigned To => Retail
2016-08-01 18:54 shuehner Triggers an Emergency Pack => No
2016-08-01 18:54 shuehner Tag Attached: Performance
2018-02-07 13:20 Sandrahuguet Assigned To Retail => Sandrahuguet
2018-02-28 08:31 Sandrahuguet Review Assigned To => marvintm
2018-02-28 08:42 hgbot Checkin
2018-02-28 08:42 hgbot Note Added: 0102862
2018-02-28 08:42 hgbot Status new => resolved
2018-02-28 08:42 hgbot Resolution open => fixed
2018-02-28 08:42 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/dba7db40d9b1056a066deec5be60fe31028dc83f [^]
2018-02-28 17:55 marvintm Status resolved => closed
2018-02-28 17:55 marvintm Fixed in Version => RR18Q2


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker