Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0023198Openbravo ERPA. Platformpublic2013-02-28 18:142013-03-28 01:39
AugustoMauch 
shankarb 
normalmajorhave not tried
closedfixed 
5
 
3.0MP223.0MP22 
AugustoMauch
Core
No
0023198: Centralize and improve the retrieval of EmailServerConfiguration
In the PrintController.createEmailOptionsPage method there is some code used to retrieve the EmailServerConfiguration object that should be used to send an email. This logic should be centralized so that it is reusable.

This logic should be improved because the way it is it's not retrieving the proper EmailServerConfiguration for each organization. Right now it does the following:
- Returns the EmailServerConfiguration defined for the current organization
- If there are none, returns the EmailServerConfiguration of the '*'
- If there are none, returns the first EmailServerConfiguration listed (using an arbitrary order).

It should work like this:
- If the current organization has a EmailServerConfiguration defined, returned it
- If not do the same with its parent organization, until the '*' organization is reached.

Example: how it works Right
-
No tags attached.
related to feature request 00232993.0MP22 closed alostale Send email on events 
related to defect 00234793.0MP22 closed AugustoMauch Retrieval of EmailServerConfiguration does not work if several clients have configured their email 
Issue History
2013-02-28 18:14AugustoMauchNew Issue
2013-02-28 18:14AugustoMauchAssigned To => AugustoMauch
2013-02-28 18:14AugustoMauchModules => Core
2013-02-28 18:14AugustoMauchTriggers an Emergency Pack => No
2013-02-28 18:15AugustoMauchSummaryCentralize and improve EmailServerConfiguration retrieval => Centralize and improve the retrieval of EmailServerConfiguration
2013-03-14 10:08shankarbAssigned ToAugustoMauch => shankarb
2013-03-14 10:29alostaleRelationship addedrelated to 0023299
2013-03-14 10:29alostaleIssue Monitored: alostale
2013-03-17 15:39hgbotCheckin
2013-03-17 15:39hgbotNote Added: 0057282
2013-03-17 15:39hgbotStatusnew => resolved
2013-03-17 15:39hgbotResolutionopen => fixed
2013-03-17 15:39hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/5def5186a07f8394ad89bc4aee171a8de3fe186d [^]
2013-03-17 15:39shankarbIssue Monitored: AugustoMauch
2013-03-18 11:06AugustoMauchNote Added: 0057294
2013-03-18 11:06AugustoMauchStatusresolved => new
2013-03-18 11:06AugustoMauchResolutionfixed => open
2013-03-18 12:50hgbotCheckin
2013-03-18 12:50hgbotNote Added: 0057299
2013-03-18 12:50hgbotStatusnew => resolved
2013-03-18 12:50hgbotResolutionopen => fixed
2013-03-18 12:50hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/5def5186a07f8394ad89bc4aee171a8de3fe186d [^] => http://code.openbravo.com/erp/devel/pi/rev/39233b3f573537b73626213dbaf68a4f3102e1ed [^]
2013-03-26 11:44hgbotCheckin
2013-03-26 11:44hgbotNote Added: 0057458
2013-03-26 16:07hgbotCheckin
2013-03-26 16:07hgbotNote Added: 0057463
2013-03-26 18:57hgbotCheckin
2013-03-26 18:57hgbotNote Added: 0057479
2013-03-27 18:23AugustoMauchReview Assigned To => AugustoMauch
2013-03-27 18:23AugustoMauchNote Added: 0057515
2013-03-27 18:23AugustoMauchStatusresolved => closed
2013-03-27 18:23AugustoMauchFixed in Version => 3.0MP22
2013-03-28 01:39hudsonbotCheckin
2013-03-28 01:39hudsonbotNote Added: 0057519
2013-03-28 01:39hudsonbotCheckin
2013-03-28 01:39hudsonbotNote Added: 0057527
2013-04-03 16:31AugustoMauchRelationship addedrelated to 0023479

Notes
(0057282)
hgbot   
2013-03-17 15:39   
Repository: erp/devel/pi
Changeset: 5def5186a07f8394ad89bc4aee171a8de3fe186d
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Sun Mar 17 20:08:08 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/5def5186a07f8394ad89bc4aee171a8de3fe186d [^]

Fixes Issue 0023198: Centralize and improve the retrieval of EmailServerConfiguration

Updated EmailServerConfiguration to retrieve the organization based on the parent hierarchy.
It works as follows:
- If the current organization has a EmailServerConfiguration defined, return it.
- If not do the same with its parent organization, until the '*' organization is reached.

---
M src/org/openbravo/erpCommon/utility/reporting/printing/PrintController.java
---
(0057294)
AugustoMauch   
2013-03-18 11:06   
Only part of the requirements have been fixed. The retrieval of the EmailServerConfiguration now works properly, but it should be centralized so that it can be used from other Openbravo components.

Other comments:
- Why the need to add this order by? [1]
- To check if a list is empty, don't compare its size with 0 but use the isEmpty() function

[1] https://code.openbravo.com/erp/devel/pi/rev/5def5186a07f8394ad89bc4aee171a8de3fe186d#l1.68 [^]
(0057299)
hgbot   
2013-03-18 12:50   
Repository: erp/devel/pi
Changeset: 39233b3f573537b73626213dbaf68a4f3102e1ed
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Mon Mar 18 17:18:15 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/39233b3f573537b73626213dbaf68a4f3102e1ed [^]

Fixes Issue 0023198: Centralization of EmailServerConfiguration

Added email server configuration to Utility and applied code review changes

---
M src/org/openbravo/erpCommon/utility/Utility.java
M src/org/openbravo/erpCommon/utility/reporting/printing/PrintController.java
---
(0057458)
hgbot   
2013-03-26 11:44   
Repository: erp/devel/pi
Changeset: b22612f93099797a9827562ac6dc8449b0152fc9
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Tue Mar 26 16:12:15 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/b22612f93099797a9827562ac6dc8449b0152fc9 [^]

Related to Issue 23198 : Added EmailUtils.java, code refactoring

Added a new file EmailUtils.java.
Moved getEmailConfiguration from Utility.java to EmailUtils.java
Refactored EmailEventManager and PrintController class to call the EmailUtils methods

---
M src/org/openbravo/email/EmailEventManager.java
M src/org/openbravo/erpCommon/utility/Utility.java
M src/org/openbravo/erpCommon/utility/reporting/printing/PrintController.java
A src/org/openbravo/email/EmailUtils.java
---
(0057463)
hgbot   
2013-03-26 16:07   
Repository: erp/devel/api-checks
Changeset: 0e9f0571ebc918c624a9c74997c727bfb9aa76db
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Tue Mar 26 20:35:06 2013 +0530
URL: http://code.openbravo.com/erp/devel/api-checks/rev/0e9f0571ebc918c624a9c74997c727bfb9aa76db [^]

Related to Issue 23198 : Fix false positive in int-api/3840 build

Removed method was not published yet.

---
M java/reference/java.japi.gz
---
(0057479)
hgbot   
2013-03-26 18:57   
Repository: erp/devel/pi
Changeset: dede88e1e38f8819dd2b3b89529068317ae243c2
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Tue Mar 26 23:26:03 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/dede88e1e38f8819dd2b3b89529068317ae243c2 [^]

Related to Issue 23198 : Code refactoring

---
M src/org/openbravo/email/EmailUtils.java
---
(0057515)
AugustoMauch   
2013-03-27 18:23   
Code reviewed and verified in pi@bc2062961ed8
(0057519)
hudsonbot   
2013-03-28 01:39   
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/6c4c5ed08030 [^]

Maturity status: Test
(0057527)
hudsonbot   
2013-03-28 01:39   
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/6c4c5ed08030 [^]

Maturity status: Test