fixed BUG-43584: alerts not counted in main top bar widget
authorAsier Lostalé <asier.lostale@openbravo.com>
Thu, 26 Mar 2020 07:43:14 +0100
changeset 37242 963b1136e42a
parent 37241 602682efc345
child 37243 273baf3c5fbc
fixed BUG 43584: alerts not counted in main top bar widget

Alerts defined whose alert rule was defined in an organization
different than * were not counted in main top bar widget.

Parameter to set filter out not readeable organizations was
incorrectly setting clients instead of organizations.
modules/org.openbravo.client.application/src/org/openbravo/client/application/AlertActionHandler.java
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/AlertActionHandler.java	Thu Mar 26 12:25:43 2020 +0100
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/AlertActionHandler.java	Thu Mar 26 07:43:14 2020 +0100
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2009-2019 Openbravo SLU 
+ * All portions are Copyright (C) 2009-2020 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -129,7 +129,7 @@
         .setParameter("userId", OBContext.getOBContext().getUser().getId())
         .setParameter("roleId", OBContext.getOBContext().getRole().getId())
         .setParameterList("clients", OBContext.getOBContext().getReadableClients())
-        .setParameterList("orgs", OBContext.getOBContext().getReadableClients());
+        .setParameterList("orgs", OBContext.getOBContext().getReadableOrganizations());
 
     return qry.stream()
         .collect(groupingBy(rule -> Objects.toString(rule.getFilterClause(), ""))) // null can't be