Fixes issue 0006492. Only select selected users.
authorAnthony Wolski <anthony.wolski@openbravo.com>
Thu, 22 Jan 2009 14:43:10 +0000
changeset 2702 878f282265d6
parent 2701 9177a608364c
child 2703 418c6ad7f246
Fixes issue 0006492. Only select selected users.
src/org/openbravo/erpCommon/ad_process/AlertProcess_data.xsql
--- a/src/org/openbravo/erpCommon/ad_process/AlertProcess_data.xsql	Thu Jan 22 14:33:27 2009 +0000
+++ b/src/org/openbravo/erpCommon/ad_process/AlertProcess_data.xsql	Thu Jan 22 14:43:10 2009 +0000
@@ -146,25 +146,8 @@
              AND SENDEMAIL = 'Y'
              AND R.AD_USER_ID = U.AD_USER_ID
              AND C.AD_CLIENT_ID = U.AD_CLIENT_ID
-          union
-          SELECT C.SMTPHOST,
-                 REQUESTUSER,
-                 REQUESTUSERPW,
-                 C.REQUESTEMAIL AS MAILFROM,
-                 U.EMAIL AS MAILTO,
-                 C.AD_LANGUAGE
-            FROM AD_ALERTRECIPIENT R,
-                 AD_CLIENT C,
-                 AD_USER U
-           WHERE AD_ALERTRULE_ID = ?
-             AND SENDEMAIL = 'Y'
-             AND C.AD_CLIENT_ID = U.AD_CLIENT_ID
-             and u.ad_user_id in (select ad_user_id
-                                    from ad_user_roles ur
-                                   where ur.ad_role_id = r.ad_role_id)
       ]]></Sql>
       <Parameter name="alertRuleId"/>
-      <Parameter name="alertRuleId"/>
    </SqlMethod>
    
 </SqlClass>