Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0040580Openbravo ERPA. Platformpublic2019-04-10 12:382019-05-21 15:16
shuehner 
alostale 
normalminorhave not tried
closedfixed 
5
 
3.0PR19Q3 
caristu
Core
No
0040580: AlertActionHandler.countActiveAlerts is not using bind-parameters
This code is not using bind-params:

    final String hql = "select distinct(e.alertRule)" + " from ADAlertRecipient"
        + " e where e.alertRule.active = true and (e.userContact.id= :userId "
        + " or (e.userContact.id = null and e.role.id = :roleId))"

        // select only those rules that are client/org visible from current role
        + " and e.alertRule.client.id " + OBDal.getInstance().getReadableClientsInClause()
        + " and e.alertRule.organization.id "
        + OBDal.getInstance().getReadableOrganizationsInClause();

Note: The 2 public OBDal utility methods invite doing that wrongly.
Probably we should deprecate them and fix up all users (i.e. ExternalOrderLoader also)
-
No tags attached.
blocks design defect 0038136 acknowledged Triage Platform Base Tracking issue: Find & Fix queries not using bind-params but embedding values into query string 
blocks design defect 0040591 closed alostale deprecate OBDal getReadableClientsInClause and getReadableOrganizationsInClause 
causes defect 0043579 closed alostale Alerts don't show in the main button, only in alert management window 
Issue History
2019-04-10 12:38shuehnerNew Issue
2019-04-10 12:38shuehnerAssigned To => platform
2019-04-10 12:38shuehnerModules => Core
2019-04-10 12:38shuehnerTriggers an Emergency Pack => No
2019-04-10 12:38shuehnerRelationship addedblocks 0038136
2019-04-11 08:41alostaleAssigned Toplatform => alostale
2019-04-11 08:42alostaleReview Assigned To => caristu
2019-04-11 08:44hgbotCheckin
2019-04-11 08:44hgbotNote Added: 0111072
2019-04-11 08:44hgbotStatusnew => resolved
2019-04-11 08:44hgbotResolutionopen => fixed
2019-04-11 08:44hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/4e9a59919638dbeb086e08446c1fe5cb2e6bf362 [^]
2019-04-11 09:43alostaleRelationship addedblocks 0040591
2019-04-12 08:31caristuNote Added: 0111096
2019-04-12 08:32caristuStatusresolved => closed
2019-04-12 08:32caristuFixed in Version => 3.0PR19Q3
2019-05-21 15:16hudsonbotCheckin
2019-05-21 15:16hudsonbotNote Added: 0111966
2020-03-26 07:22alostaleRelationship addedcauses 0043579

Notes
(0111072)
hgbot   
2019-04-11 08:44   
Repository: erp/devel/pi
Changeset: 4e9a59919638dbeb086e08446c1fe5cb2e6bf362
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Apr 11 08:28:42 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/4e9a59919638dbeb086e08446c1fe5cb2e6bf362 [^]

fixed bug 40580: used bind parameters in alert action handler and datasource

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/ADAlertDatasourceService.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/AlertActionHandler.java
---
(0111096)
caristu   
2019-04-12 08:31   
Reviewed
(0111966)
hudsonbot   
2019-05-21 15:16   
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/9b8f37d9d85e [^]
Maturity status: Test