Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0019545Openbravo ERPA. Platformpublic2012-01-23 22:042012-04-02 12:51
dbaz 
dbaz 
highmajoralways
closedfixed 
5
 
3.0MP9 
Core
No
0019545: Email server configuration is in different places
Right now there are two places to configure the email:

* "Client" window: this configuration is used in Alerts email notification
* "Email Configuration" window (child of "Client): this configuration is used in reports sent by email ("Email" toolbar icon button)

This is wrong and both features should use an unique email server configuration: the one in "Email Configuration"
See "Test plan" comment in order to know how to test it.
No tags attached.
has duplicate feature request 0006808 closed jonalegriaesarte Two places to configure mail-servers: 1.) Client (Request Management) and 2.) Client || Poc Configuration 
related to defect 00204133.0MP11 closed marvintm It does not work alerts emails 
related to defect 0037498 closed platform org.openbravo.businessUtility.Email class is deprecated since 3.0MP9 and should be removed. 
Issue History
2012-01-23 22:04dbazNew Issue
2012-01-23 22:04dbazAssigned To => dbaz
2012-01-23 22:04dbazModules => Core
2012-01-23 22:16dbazNote Added: 0044494
2012-01-23 22:44dbazNote Added: 0044495
2012-01-23 22:48dbazNote Edited: 0044495bug_revision_view_page.php?bugnote_id=0044495#r3081
2012-01-25 16:15dbazNote Edited: 0044495bug_revision_view_page.php?bugnote_id=0044495#r3097
2012-02-02 16:41hgbotCheckin
2012-02-02 16:41hgbotNote Added: 0044821
2012-02-02 16:41hgbotStatusnew => resolved
2012-02-02 16:41hgbotResolutionopen => fixed
2012-02-02 16:41hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/145375d4a13660cb80ac82264f640077906d0d52 [^]
2012-02-02 16:44dbazNote Added: 0044823
2012-02-08 19:11marvintmStatusresolved => closed
2012-02-15 13:33hgbotCheckin
2012-02-15 13:33hgbotNote Added: 0045148
2012-02-16 12:40hgbotCheckin
2012-02-16 12:40hgbotNote Added: 0045189
2012-02-16 13:16hgbotCheckin
2012-02-16 13:16hgbotNote Added: 0045191
2012-03-02 15:34hudsonbotCheckin
2012-03-02 15:34hudsonbotNote Added: 0045737
2012-03-02 15:37hudsonbotCheckin
2012-03-02 15:37hudsonbotNote Added: 0045857
2012-03-02 15:37hudsonbotCheckin
2012-03-02 15:37hudsonbotNote Added: 0045870
2012-03-02 15:37hudsonbotCheckin
2012-03-02 15:37hudsonbotNote Added: 0045872
2012-03-15 12:29hgbotCheckin
2012-03-15 12:29hgbotNote Added: 0046450
2012-04-01 20:33hgbotCheckin
2012-04-01 20:33hgbotNote Added: 0047013
2012-04-02 06:10hudsonbotCheckin
2012-04-02 06:10hudsonbotNote Added: 0047147
2012-04-02 12:51marvintmNote Added: 0047305
2012-05-04 11:16marvintmRelationship addedrelated to 0020413
2013-04-22 21:42shuehnerRelationship addedhas duplicate 0006808
2021-06-21 11:17shuehnerRelationship addedrelated to 0037498

Notes
(0044494)
dbaz   
2012-01-23 22:16   
To fix the "design deffect" there are four steps:

* Create a module script that copies the data from "Client" window configuration (ONLY if "Mail Host" field is set) to "Email Configuration" window.
The new "Email Configuration" created configuration will have AD_ORG_ID = '0' in order to avoid possible conflicts. The AD_CLIENT_ID will be the same than the original "Client" configuration.
NOTES:
- If there is already a configuration introduced in the new implementation, don't create a new one in the new implementation. (Preserve also the old implementation configuration)
- If there is not configuration in the new implementation, move the data, and delete the configuration of the old implementation.
- If the existing configuration of the new implementation is the same than the old implementation one and is active, delete the configuration of the old implementation and set the new implementation configuration AD_ORG_ID = '0'

* Add a display logic, so if "Mail Host" field is empty, no one of the "Request Management" section items will be shown (to avoid from now on people introducing any configuration in these items).

* Modify the Alerts email sending logic in order to use the new implementation configuration ONLY in the case there is no old implementation configuration.
(0044495)
dbaz   
2012-01-23 22:44   
(edited on: 2012-01-25 16:15)
Test plan:

Part 1:

Create an instance with 5 clients:
Client A: only valid email configuration in the old implementation
Client B: only valid email configuration in the new implementation
Client C: DIFFERENT valid email configurations (different "Mail Host" vs "Smtp Server") in both old implementation and new implementation.
Client D: SAME valid email configurations (different "Mail Host" vs "Smtp Server") in both old implementation and new implementation. New implementation as "Active"

Update with the design deffect fix code and upgrade your instance. Now the only configuration that should remain the old implementation is "Client C". In the other cases "Request Management" is not shown.

This module script part of the test is MANDATORY to be tested in both Oracle and Postgres.

Part 2:

Ensure that emails sent within a form (email toolbar icon button) continue working as expected. For this configure a valid "Email Configuration" and try in any window. A more complete explanation of how to configure it can be found here: http://wiki.openbravo.com/wiki/Projects/Outbound_Email/User_Guide [^]

Also ensure emails logs are generated as previous (C_POC_EMAIL)

Part 3:

Ensure that both "Client A" and "Client C" sent emails for Alerts ("Client A" using the new implementation, ported in the module script, and "Client C" using the old implementation). You can take advantage of this document http://wiki.openbravo.com/wiki/Functional_Documentation/Alerts [^]
in order to configure an alert.

As a "trick" to do it faster, inside AlertProcess.java, change
if (insertions > 0)
by
if (insertions != -1)
to ensure always emails are sent (to the configured alert recipients, of course), and not just the first time the alert is raised.

The only change the tester could notice, is that using the old configuration, could be a situation where THE SAME email be sent to the same address many times for the same alert. In the new implementation there is an improvement to avoid this to happen.

(0044821)
hgbot   
2012-02-02 16:41   
Repository: erp/devel/pi
Changeset: 145375d4a13660cb80ac82264f640077906d0d52
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Wed Jan 25 20:32:54 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/145375d4a13660cb80ac82264f640077906d0d52 [^]

Fixed issue 19545: 'Alerts' email system now uses POC 'Email Configuration' too

---
M src-db/database/sourcedata/AD_FIELD.xml
M src/org/openbravo/erpCommon/ad_process/AlertProcess.java
M src/org/openbravo/erpCommon/businessUtility/EMail.java
M src/org/openbravo/erpCommon/utility/poc/EmailManager.java
M src/org/openbravo/erpCommon/utility/reporting/printing/PrintController.java
A src-util/modulescript/build/classes/org/openbravo/modulescript/UpgradeToPocEmail.class
A src-util/modulescript/build/classes/org/openbravo/modulescript/UpgradeToPocEmailData.class
A src-util/modulescript/src/org/openbravo/modulescript/UpgradeToPocEmail.java
A src-util/modulescript/src/org/openbravo/modulescript/UpgradeToPocEmail_Data.xsql
---
(0044823)
dbaz   
2012-02-02 16:44   
Code-review changes

https://code.openbravo.com/erp/devel/pi/rev/3dce4c87de78 [^]
(0045148)
hgbot   
2012-02-15 13:33   
Repository: erp/devel/pi
Changeset: 32cfb3ecb7d73f0558ea017a353d6844256e1014
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Wed Feb 15 13:32:31 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/32cfb3ecb7d73f0558ea017a353d6844256e1014 [^]

Related to issue 19545: Removed deprecation warnings

---
M src/org/openbravo/erpCommon/businessUtility/EMail.java
---
(0045189)
hgbot   
2012-02-16 12:40   
Repository: erp/devel/pi
Changeset: 60dc2b18fc074fa12254b7bba76894871c3a1823
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Feb 16 12:40:02 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/60dc2b18fc074fa12254b7bba76894871c3a1823 [^]

Related to issue 19545. Readded deprecation, but without the warnings

---
M src/org/openbravo/erpCommon/ad_process/AlertProcess.java
M src/org/openbravo/erpCommon/businessUtility/EMail.java
---
(0045191)
hgbot   
2012-02-16 13:16   
Repository: erp/devel/pi
Changeset: 38019cbe4e6ee434a1bda516241f84e1687ed84b
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Feb 16 13:15:48 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/38019cbe4e6ee434a1bda516241f84e1687ed84b [^]

Related to issue 19545. Fixed typo

---
M src/org/openbravo/erpCommon/businessUtility/EMail.java
---
(0045737)
hudsonbot   
2012-03-02 15:34   
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/544d64e0c159 [^]

Maturity status: Test
(0045857)
hudsonbot   
2012-03-02 15:37   
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/544d64e0c159 [^]

Maturity status: Test
(0045870)
hudsonbot   
2012-03-02 15:37   
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/544d64e0c159 [^]

Maturity status: Test
(0045872)
hudsonbot   
2012-03-02 15:37   
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/544d64e0c159 [^]

Maturity status: Test
(0046450)
hgbot   
2012-03-15 12:29   
Repository: erp/devel/pi
Changeset: 10a0ba3cb0aa67162b0c060720b144bcc486508f
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Thu Mar 15 12:29:11 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/10a0ba3cb0aa67162b0c060720b144bcc486508f [^]

Related to issue 19545: Removed undesired log4j.error when there is no email configured

---
M src/org/openbravo/erpCommon/ad_process/AlertProcess.java
---
(0047013)
hgbot   
2012-04-01 20:33   
Repository: erp/devel/pi
Changeset: 0622ea4d08c05616fc7192fa752f0c60ae48b9b1
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Thu Mar 15 12:29:11 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/0622ea4d08c05616fc7192fa752f0c60ae48b9b1 [^]

Related to issue 19545: Removed undesired log4j.error when there is no email configured

---
M src/org/openbravo/erpCommon/ad_process/AlertProcess.java
---
(0047147)
hudsonbot   
2012-04-02 06:10   
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/7814864461ac [^]

Maturity status: Test
(0047305)
marvintm   
2012-04-02 12:51   
All the commits done after the issue was closed were subsequently reviewed and tested.