SIL email templates missing formatting

MOlejko September 8, 2021

Hi everyone!

I hava a problem. :(

In kepler I have email template in HTML, where it refers to the description of issue.

I have SIL program where I send email with this template.

Email is good, I am getting it, but issue description missing line break. 

Description is plain text, without formatting

Any ideas?

1 answer

1 accepted

0 votes
Answer accepted
Iryna Ihnatiuk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 8, 2021

Hi @MOlejko ,

Don't you mind raising a support ticket so that we could investigate it? Details about Jira and app version, screenshots of your configuration and actual results are much appreciated.

Thank you in advance.

Regards,
Iryna
Anova Apps Products Team

MOlejko September 8, 2021

Hi!

Jira Server 7.1

Desription - issue:

desc_issue.PNG

Email - send from SIL: 

sendHtmlEmail("my email", "Summary" + key, "testowe.tpl");

kepler - templates - testowe.tpl:

<html>

<body>

(...)

<div style="text-align: left;">$description$</div>

</body>

</html>

E-mail, missing formatting from field description:

desc-email.PNG

Iryna Ihnatiuk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 14, 2021

Hi @MOlejko

Please have a look at this example:

string [] descriptionLines = split(description, "\\u000A");

string formattedDescription;
for (string line in descriptionLines) {
formattedDescription += line + "<br>";
}

// string body = executeTemplate("templates/testowe.tpl");

// runnerLog(body);

sendHtmlEmail("my email", "Summary" + key, "testowe.tpl");

Try using sendEmail as sendHtmlEmail() has been deprecated:

<html>

<body>

(...)

<div style="text-align: left;">$formattedDescription$</div>

</body>

</html>

https://anovaapps.atlassian.net/wiki/spaces/PKB/pages/535789978/Using+the+split+Routine

If you still face any issues or have questions, reach out to us via Support portal directly.

 

Regards,
Iryna

MOlejko September 20, 2021

Thanks a lot!

I saved my custom field in other field (HTML field) and it works :)

Suggest an answer

Log in or Sign up to answer