Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0013854Openbravo ERP01. General setuppublic2010-07-01 12:582010-08-24 11:53
networkb 
adrianromero 
immediatemajoralways
closedfixed 
5
2.50MP19 
2.50MP20 
Core
No
0013854: If the reciptien of an alert has an email defined the alert is sent by email althought you don't have define it
If the reciptien of an alert has an email defined the alert is sent by email althought you don't have define it
-configure the header tab on the client definition window to use email.Do it for small bazar.

-Has Openbravo Admin, create a new user and define an email for it.
-Create an alert for smallbazar client, i.e:
select req.m_requisition_id as referencekey_id,
       req.documentno as record_id,
       0 as ad_role_id,
       req.ad_user_id as ad_user_id,
       'La solicitud '||req.documentno||' no tiene descripcion' as description,
       'Y' as isActive,
        req.ad_org_id,
        req.ad_client_id,
        now() as created,
        0 as createdBy,
        now() as updated,
        0 as updatedby
  from m_requisition req
  where req.description is null;
-In the recipient tab add the user defined previously.
-Don't check the sendmail checkbox
-Create a requistion without description to launch te alert created previosly
-When the alert is created see that an email is send.
On the AlertProcess_data.xsql file
modify the preparemail method
adding a new condtion for each select on the union
as

AND AR.AND SENDEMAIL = 'Y'
No tags attached.
Issue History
2010-07-01 12:58networkbNew Issue
2010-07-01 12:58networkbAssigned To => adrianromero
2010-07-01 13:15networkbTarget Version => 2.50MP20
2010-07-01 16:31hgbotCheckin
2010-07-01 16:31hgbotNote Added: 0028954
2010-07-01 16:31hgbotStatusnew => resolved
2010-07-01 16:31hgbotResolutionopen => fixed
2010-07-01 16:31hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/c74447443fa374eef36f1062ce98af78362df172 [^]
2010-07-01 16:35adrianromeroNote Added: 0028956
2010-07-02 12:00psarobeTag Attached: Regression
2010-07-02 14:51hudsonbotCheckin
2010-07-02 14:51hudsonbotNote Added: 0029005
2010-07-23 09:00sureshbabuNote Added: 0029492
2010-07-23 09:00sureshbabuStatusresolved => closed
2010-07-24 00:00anonymoussf_bug_id0 => 3033807
2010-08-24 11:49psarobeTag Detached: Regression
2010-08-24 11:53psarobeNote Added: 0030244

Notes
(0028954)
hgbot   
2010-07-01 16:31   
Repository: erp/devel/pi
Changeset: c74447443fa374eef36f1062ce98af78362df172
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Thu Jul 01 16:30:59 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/c74447443fa374eef36f1062ce98af78362df172 [^]

Fixes issue 0013854: If the reciptien of an alert has an email defined the alert is sent by email althought you don't have define it
It has been added a filter to the prepareMails sentence to get only records that have the sendemail field active.

---
M src/org/openbravo/erpCommon/ad_process/AlertProcess_data.xsql
---
(0028956)
adrianromero   
2010-07-01 16:35   
* Testing of the issue

Follow the steps to reproduce and notice that when the alert is created no email will be sent

* Other areas affected

Only the function that sends mail for alerts it is affected, no other areas to test.
(0029005)
hudsonbot   
2010-07-02 14:51   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/c74447443fa3 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/8fd5a427789e [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17797.obx [^]
(0029492)
sureshbabu   
2010-07-23 09:00   
verified
(0030244)
psarobe   
2010-08-24 11:53   
Finally this is not a regression but an issue that was not properly fixed. The original issue that caused the "regression" was 0011811 but after doing some research it came out that the issue was not properly fixed. Before issue 0011811 you didn't receive any email and after that fixed you always received an email even you didn't want to. So the correct action would have been to reopen the issue since it was not properly fixed