Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0024549Openbravo ERPZ. Otherspublic2013-08-20 13:302013-08-21 18:59
vmromanos 
vmromanos 
urgentmajoralways
closedfixed 
20Debian 5.0
pi 
3.0MP27 
dmiguelez
Core
No
0024549: Regular expression errors when sending emails
In case the data replacing the report template tags (@cus_ref@, @our_ref@, @cus_nam@, @sal_nam@, @bp_nam@, @doc_date@, @doc_desc@, @doc_nextduedate@ and @doc_lastduedate@) contains backslashes '\' or dollar signs '$', the regular expression replacement done when sending the email may result in a regular expression error that avoids to send the email.

See http://docs.oracle.com/javase/6/docs/api/java/lang/String.html#replaceAll [^](java.lang.String, java.lang.String)
1. Select any sales invoice
2. Browse to the user/contact and replace the first and last name by $mith
3. Ensure the template contains the @cus_nam@ tag in either the subject or the body
4. Try to send the invoice by email. An error is displayed
Use Matcher.quoteReplacement(java.lang.String) to suppress the special meaning of these characters ($, \)
No tags attached.
related to feature request 00245323.0MP27 closed vmromanos Support more variables (tags) when sending emails 
Issue History
2013-08-20 13:30vmromanosNew Issue
2013-08-20 13:30vmromanosAssigned To => vmromanos
2013-08-20 13:30vmromanosModules => Core
2013-08-20 13:30vmromanosTriggers an Emergency Pack => No
2013-08-20 13:31vmromanosRelationship addedrelated to 0024532
2013-08-20 13:31vmromanosStatusnew => scheduled
2013-08-20 13:31vmromanosfix_in_branch => pi
2013-08-20 13:37hgbotCheckin
2013-08-20 13:37hgbotNote Added: 0060682
2013-08-20 13:37hgbotStatusscheduled => resolved
2013-08-20 13:37hgbotResolutionopen => fixed
2013-08-20 13:37hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/b09efdf35533f0e742f97157adce20338752ade6 [^]
2013-08-21 13:16dmiguelezReview Assigned To => dmiguelez
2013-08-21 13:16dmiguelezNote Added: 0060709
2013-08-21 13:16dmiguelezStatusresolved => closed
2013-08-21 18:59hudsonbotCheckin
2013-08-21 18:59hudsonbotNote Added: 0060717

Notes
(0060682)
hgbot   
2013-08-20 13:37   
Repository: erp/devel/pi
Changeset: b09efdf35533f0e742f97157adce20338752ade6
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Tue Aug 20 13:36:57 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/b09efdf35533f0e742f97157adce20338752ade6 [^]

Fixed bug 24549: Regular expression errors when sending emails

Use Matcher.quoteReplacement(java.lang.String) to suppress the special meaning of characters: '$' and '\'

---
M src/org/openbravo/erpCommon/utility/reporting/Report.java
M src/org/openbravo/erpCommon/utility/reporting/printing/PrintController.java
---
(0060709)
dmiguelez   
2013-08-21 13:16   
Code Review + Testing Ok
(0060717)
hudsonbot   
2013-08-21 18:59   
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/5a759279dc34 [^]

Maturity status: Test