Openbravo Issue Tracking System - POS2
View Issue Details
0051642POS2POSpublic2023-02-17 13:102024-04-30 16:58
montse_cabanas 
cberner 
highmajorhave not tried
closedfixed 
5
 
24Q3 
No
0051642: Error send email with variables
When variables (@var@) are put in the subject or body of an email, the variable is not replaced by its data
If you define in the Email Configuration template replacements for subject, body or attachment they don’t apply

1-In Backoffice Document Types window > Template Definition and Email Configuraiton tabs put some @variables@ to apply for POS Order

2-Send email of a ticket from POS: the replacement won’t happen in the subject, body nor attachment file name
No tags attached.
depends on backport 005537924Q2 closed cberner POS2 Error send email with variables 
related to defect 0054938 closed cberner Openbravo ERP Send Email : we need to support CSS @ notations (which means do not replace not known variables) 
Issue History
2023-02-17 13:10montse_cabanasNew Issue
2023-02-17 13:10montse_cabanasAssigned To => montse_cabanas
2023-02-17 13:10montse_cabanasFile Added: e575e658-bd7b-4b04-b834-582cbebae0c5.png
2023-02-17 13:10montse_cabanasTriggers an Emergency Pack => No
2023-02-17 13:11montse_cabanasFile Added: ccaca7a7-de6d-404e-aba1-7e9a7c527a34.png
2023-02-17 13:16hgbotNote Added: 0146698
2023-02-17 15:32aferrazFile Deleted: e575e658-bd7b-4b04-b834-582cbebae0c5.png
2023-02-17 15:32aferrazFile Deleted: ccaca7a7-de6d-404e-aba1-7e9a7c527a34.png
2023-02-17 15:34hgbotResolutionopen => fixed
2023-02-17 15:34hgbotStatusnew => closed
2023-02-17 15:34hgbotFixed in Version => 23Q2
2023-02-17 15:34hgbotNote Added: 0146709
2023-02-17 15:34hgbotNote Added: 0146710
2023-03-02 11:13hgbotNote Added: 0147224
2023-03-02 11:34hgbotNote Added: 0147227
2023-03-02 11:35aferrazNote Added: 0147228
2023-03-02 11:35aferrazStatusclosed => new
2023-03-02 11:35aferrazResolutionfixed => open
2023-03-02 11:35aferrazFixed in Version23Q2 =>
2023-11-30 16:44aferrazAssigned Tomontse_cabanas => Retail
2024-02-09 13:11avicentePrioritynormal => high
2024-02-20 09:13guillermogilStatusnew => acknowledged
2024-02-22 08:15guillermogilTypedefect => design defect
2024-04-05 12:13avicenteNote Added: 0162880
2024-04-05 12:13avicenteTypedesign defect => defect
2024-04-05 12:13avicenteStatusacknowledged => scheduled
2024-04-05 12:15avicenteAssigned ToRetail => Triage Platform Base
2024-04-29 14:13hgbotNote Added: 0163902
2024-04-30 16:53cbernerStatusscheduled => acknowledged
2024-04-30 16:53cbernerStatusacknowledged => scheduled
2024-04-30 16:53cbernerAssigned ToTriage Platform Base => cberner
2024-04-30 16:58hgbotResolutionopen => fixed
2024-04-30 16:58hgbotStatusscheduled => closed
2024-04-30 16:58hgbotFixed in Version => 24Q3
2024-04-30 16:58hgbotNote Added: 0163962
2024-04-30 16:58hgbotNote Added: 0163963
2024-04-30 17:00cbernerRelationship addedrelated to 0054938

Notes
(0146698)
hgbot   
2023-02-17 13:16   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1533 [^]
(0146709)
hgbot   
2023-02-17 15:34   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 1471133bac63678413cc96f9b0f8f6610e772e96
Author: Montserrat Cabañas <montserrat.cabanas@openbravo.com>
Date: 17-02-2023 14:34:15
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/1471133bac63678413cc96f9b0f8f6610e772e96 [^]

Fixes ISSUE-51642: Error sending email with variables

---
M src/org/openbravo/pos2/mailing/Mailer.java
---
(0146710)
hgbot   
2023-02-17 15:34   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1533 [^]
(0147224)
hgbot   
2023-03-02 11:13   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1567 [^]
(0147227)
hgbot   
2023-03-02 11:34   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1567 [^]
(0147228)
aferraz   
2023-03-02 11:35   
Revert "[fr/51642-SendMailWithVariables] Fix send mail"

This reverts commit 94f9be406335ce7d34365e9e02e92d3917cdc228.

https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/0d0c3a21832c9ee3a2be361d6ec31c701783b8e0 [^]
(0162880)
avicente   
2024-04-05 12:13   
51642 is not a design defect as it works in previous version. For the customers is a regression.
(0163902)
hgbot   
2024-04-29 14:13   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/2600 [^]
(0163962)
hgbot   
2024-04-30 16:58   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 4e74f85fda3ea4cd01bafc91f0643410575f1e6e
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 30-04-2024 16:49:02
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/4e74f85fda3ea4cd01bafc91f0643410575f1e6e [^]

Fixes ISSUE-51642: Send email variables not applied or failing with CSS @media notation

Variables are @variableName@ strings in the email template that are
replaced by their respective property value. Previously only those
strings that match @variableName @ (see the white-space) were being
replaced, which was wrong.

We changed to replace @variableName@, removing that white-space. This
resulted in some templates failing due to usage of css @media notations,
to fix this, the replacement method was changed from
String.replaceFirst, which accepted a regex string, to
StringUtils.replaceOnce, which accepts a text search string, which will
not trigger regex pattern errors.

This should result in that we can use @variableName@ in emails, and also
css @media properties. If a variable does not exist, it will not be
replaced.

---
M src/org/openbravo/pos2/mailing/Mailer.java
---
(0163963)
hgbot   
2024-04-30 16:58   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/2600 [^]