Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0055379
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[POS2] POSmajorhave not tried2023-02-17 13:102024-04-30 16:58
Reportermontse_cabanasView Statuspublic 
Assigned Tocberner 
PriorityhighResolutionfixedFixed in Version24Q2
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version24Q2
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0055379: Error send email with variables

DescriptionWhen variables (@var@) are put in the subject or body of an email, the variable is not replaced by its data
Steps To ReproduceIf 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
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0051642 closedcberner Error send email with variables 

-  Notes
(0163961)
hgbot (developer)
2024-04-30 16:55

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/2604 [^]
(0163964)
hgbot (developer)
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: 6b1988fb2d7e0e64470237371880a95474691caf
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 30-04-2024 16:54:12
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/6b1988fb2d7e0e64470237371880a95474691caf [^]

Fixes ISSUE-55379: 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
---
(0163965)
hgbot (developer)
2024-04-30 16:58

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/2604 [^]

- Issue History
Date Modified Username Field Change
2024-04-30 16:53 cberner Type defect => backport
2024-04-30 16:53 cberner Target Version => 24Q2
2024-04-30 16:53 cberner Assigned To Triage Platform Base => cberner
2024-04-30 16:55 hgbot Note Added: 0163961
2024-04-30 16:58 hgbot Resolution open => fixed
2024-04-30 16:58 hgbot Status scheduled => closed
2024-04-30 16:58 hgbot Fixed in Version => 24Q2
2024-04-30 16:58 hgbot Note Added: 0163964
2024-04-30 16:58 hgbot Note Added: 0163965


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker