Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Remover quebra de linha comentário

Tiago Carlet
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 31, 2024

Estou precisando enviar o ultimo comentário do card {{comments.last.body}} para um outro sistema, porém preciso remover as quebras de linhas, alguém sabe uma forma de criar uma variável com o texto substituindo o \n por <br>?

1 answer

1 accepted

2 votes
Answer accepted
Marc - Devoteam
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.
October 31, 2024

HI @Tiago Carlet 

Welcome to the community.

This can be done in Jira, the smart values can help.

Have you tried to use replace() to substitute a space or empty string for the newline character before the test? For example:

example: {{issue.comments.last.body.replace("\n"," ")}}

Tiago Carlet
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 31, 2024

Hi,

I figured I should use the replace function, but I didn't know how to implement it.

Now it worked perfectly, thank you very much for the support.

Like Marc - Devoteam likes this
Marc - Devoteam
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.
November 1, 2024

Hi @Tiago Carlet 

Please accept my answer as a solution.

This will help other community member trying to solve the same.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events