Forums

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

How to add links from description while using trim

mohammed aamer khan July 20, 2022

Hi Community,

I have written a rule where in I am sending mail to assignee with details present in Description field. The field includes some text and some links. 

When I try sending it with {{issue.description.html}} it contains line gaps, to reduce those gaps I used {{issue.description.trim.htmlEncode}} but the problem here is the links that are present in description are now shown as simple text.

Can you please suggest me any alternate way to achieve my requirement i.e. "Send mail with test and links present in description field without extra spaces."


rule.png

Output:-

output.png

1 answer

0 votes
Bill Sheboy
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.
July 20, 2022

Hi @mohammed aamer khan 

Have you confirmed if your original Description field contains the extra line breaks, or if the html is adding them?

If they are embedded in the field, you could use replace() or replaceAll() to check for any extra line breaks, such as converting "\n\n" to "\n"

If it is from the html, perhaps convert and write that to the audit log to determine what markup is being produced.

Kind regards,
Bill

Suggest an answer

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

Atlassian Community Events