Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0034900Openbravo ERPA. Platformpublic2017-01-10 16:282017-03-15 20:18
JONHM 
NaroaIriarte 
normalmajorsometimes
closedfixed 
5
 
3.0PR17Q2 
alostale
Core
No
0034900: Default Email definitions are not selected properly
Default Email definitions are not selected properly. When having multiple email definitions for a document type, and one of them selected as 'Default', this definition is not being selected.
1) Open [Purchase Invoice] window and clear the filters. Then, select the first record in form mode.
2) Navigate to its [Document Type] by clicking into its 'Transaction Document' field (It will be probably AP Invoice)
3) Once [Document Type] window is opened, switch to 'Email Definitions' sub tab and create two email definition with different texts to differ them. Also, mark the second one as 'Default'
4) Now reopen the previous selected Invoice in [Purchase Invoice] window and press the 'Email' button on the toolbar.
--> It shows the first created email definition instead the Default one.
No tags attached.
related to design defect 0034935 acknowledged Triage Platform Base The criterion of selection of the email Definitions is not correct 
png Screenshot from 2017-01-10 16-26-29.png (150,802) 2017-01-10 16:28
https://issues.openbravo.com/file_download.php?file_id=10278&type=bug
png
Issue History
2017-01-10 16:28JONHMNew Issue
2017-01-10 16:28JONHMAssigned To => platform
2017-01-10 16:28JONHMFile Added: Screenshot from 2017-01-10 16-26-29.png
2017-01-10 16:28JONHMModules => Core
2017-01-10 16:28JONHMResolution time => 1485212400
2017-01-10 16:28JONHMTriggers an Emergency Pack => No
2017-01-10 16:35heccamIssue Monitored: heccam
2017-01-11 09:10alostaleStatusnew => acknowledged
2017-01-11 14:56NaroaIriarteAssigned Toplatform => NaroaIriarte
2017-01-12 09:01NaroaIriarteStatusacknowledged => scheduled
2017-01-12 17:40NaroaIriarteRelationship addedrelated to 0034935
2017-01-13 11:51NaroaIriarteReview Assigned To => alostale
2017-01-13 11:52hgbotCheckin
2017-01-13 11:52hgbotNote Added: 0093504
2017-01-13 11:52hgbotStatusscheduled => resolved
2017-01-13 11:52hgbotResolutionopen => fixed
2017-01-13 11:52hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/ec94c6362d99d64951a185d7bf1f39171194af79 [^]
2017-01-13 14:01hgbotCheckin
2017-01-13 14:01hgbotNote Added: 0093536
2017-01-13 14:18alostaleNote Added: 0093543
2017-01-13 14:18alostaleStatusresolved => closed
2017-01-13 14:18alostaleFixed in Version => 3.0PR17Q2
2017-03-15 20:18hudsonbotCheckin
2017-03-15 20:18hudsonbotNote Added: 0095093
2017-03-15 20:18hudsonbotCheckin
2017-03-15 20:18hudsonbotNote Added: 0095094

Notes
(0093504)
hgbot   
2017-01-13 11:52   
Repository: erp/devel/pi
Changeset: ec94c6362d99d64951a185d7bf1f39171194af79
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Thu Jan 12 17:07:55 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/ec94c6362d99d64951a185d7bf1f39171194af79 [^]

Fixed issue 34900: Email definition of the template was not correctly selected

If there was more than one email definition, one of them set as default, sometimes, when clicking the email button, the application was not choosing the correct email definition, which is the one with the "default" checkbox checked. It can happen also to have an email definition with the default checked but the language is different from the bussines partner's language, in this case if there exists another template which is not checked as default, but its language is the language of the business partner, this will have priority.

The problem here was that there was a piece of code which was using a Map, and it was overwritting the email definitions with the same language. This happened because the key used to store the email definitions in that map was the language it self. So, in the case of having, for example three email definitions with the same language and one of them set as default was failing because in the map was only stored the last one.

To fix this a new condition has been added. Now, if the email definition is marked as default, it is stored in the map. It does not matter to overwrite the other email definitions because only one can be the default and will be the one stored here. If the email definition is not marked as default instead, a comparation will be done to check if there already exists an email definition with the same language. If not, then, this email configuration will be added to the map. This is to prevent deleting the default configurations of a language.

---
M src/org/openbravo/erpCommon/utility/reporting/TemplateInfo.java
---
(0093536)
hgbot   
2017-01-13 14:01   
Repository: erp/devel/pi
Changeset: 1a343ca1fb00876e6f5b456639ba10349871109d
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Jan 13 14:00:31 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/1a343ca1fb00876e6f5b456639ba10349871109d [^]

related to bug 34900: removed some clutter for boolean value

---
M src/org/openbravo/erpCommon/utility/reporting/TemplateInfo.java
---
(0093543)
alostale   
2017-01-13 14:18   
code reviewed + tested
(0095093)
hudsonbot   
2017-03-15 20:18   
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/54e102bef53e [^]
Maturity status: Test
(0095094)
hudsonbot   
2017-03-15 20:18   
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/54e102bef53e [^]
Maturity status: Test