Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0039014Openbravo ERPA. Platformpublic2018-07-23 15:422018-08-08 13:06
alostale 
alostale 
normalminorhave not tried
closedfixed 
5
 
3.0PR18Q4 
caristu
Core
No
0039014: unneeded queries to count active alerts
When counting active alerts for current session, a count query is executed per each Alert Rule current user is recipient for.
1. Define 5 different Alert Rules
2. Assign them all to Openbravo user
3. Log in with Openbravo
  -> Check each time alert ping is performed, count for each rule is executed in DB
Group rules by filter clause to do the count.
Performance
related to defect 0039023 closed alostale unneeded contention to count active alerts 
Issue History
2018-07-23 15:42alostaleNew Issue
2018-07-23 15:42alostaleAssigned To => platform
2018-07-23 15:42alostaleModules => Core
2018-07-23 15:42alostaleTriggers an Emergency Pack => No
2018-07-23 15:55alostaleProposed Solution updated
2018-07-23 15:55alostaleAssigned Toplatform => alostale
2018-07-24 12:22alostaleReview Assigned To => caristu
2018-07-24 12:22alostaleProposed Solution updated
2018-07-24 12:23alostaleTag Attached: Performance
2018-07-24 12:27alostaleRelationship addedrelated to 0039023
2018-07-24 12:29hgbotCheckin
2018-07-24 12:29hgbotNote Added: 0105909
2018-07-24 12:29hgbotCheckin
2018-07-24 12:29hgbotNote Added: 0105910
2018-07-24 12:29hgbotStatusnew => resolved
2018-07-24 12:29hgbotResolutionopen => fixed
2018-07-24 12:29hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/fc0c131d8cd02c903e874647f69e4314702c3341 [^]
2018-07-24 16:11hgbotCheckin
2018-07-24 16:11hgbotNote Added: 0105919
2018-08-03 10:32caristuNote Added: 0106152
2018-08-03 10:32caristuStatusresolved => closed
2018-08-03 10:32caristuFixed in Version => 3.0PR18Q4
2018-08-08 13:06hudsonbotCheckin
2018-08-08 13:06hudsonbotNote Added: 0106220
2018-08-08 13:06hudsonbotCheckin
2018-08-08 13:06hudsonbotNote Added: 0106221
2018-08-08 13:06hudsonbotCheckin
2018-08-08 13:06hudsonbotNote Added: 0106225

Notes
(0105909)
hgbot   
2018-07-24 12:29   
Repository: erp/devel/pi
Changeset: 328be6af97c0f9e28e247932ba5f94f920d00058
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Jul 24 12:08:20 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/328be6af97c0f9e28e247932ba5f94f920d00058 [^]

related to bug 39014: code clean up

  extracted different actions to separate methods

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/AlertActionHandler.java
---
(0105910)
hgbot   
2018-07-24 12:29   
Repository: erp/devel/pi
Changeset: fc0c131d8cd02c903e874647f69e4314702c3341
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Jul 24 12:13:23 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/fc0c131d8cd02c903e874647f69e4314702c3341 [^]

fixed bug 39014: unneeded queries to ad_alert

  When counting active alerts, a count query was executed per each accesible
  alert rule. As part of the alert sql is dynamically generated based on rule's
  filter clase, it is only necessary to execute different queries per each
  different filter clause.

  Now alerts are grouped by fiter clause to execute the queries.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/AlertActionHandler.java
---
(0105919)
hgbot   
2018-07-24 16:11   
Repository: erp/devel/pi
Changeset: 79bbbb6e87d07e6724140d6e52299171f78233bb
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Jul 24 16:11:24 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/79bbbb6e87d07e6724140d6e52299171f78233bb [^]

related to bug 39014: fixed NPE

  When processing alert rules with null filter clause

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/AlertActionHandler.java
---
(0106152)
caristu   
2018-08-03 10:32   
Code reviewed + tested OK.
(0106220)
hudsonbot   
2018-08-08 13:06   
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/bfd7a414183a [^]
Maturity status: Test
(0106221)
hudsonbot   
2018-08-08 13:06   
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/bfd7a414183a [^]
Maturity status: Test
(0106225)
hudsonbot   
2018-08-08 13:06   
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/bfd7a414183a [^]
Maturity status: Test