How can I add a linebreak to a scripted field?

Seb Kouba March 6, 2015

I'm iterating over linked issues and I would like to have line breaks after each element. Since the field is technically a multi line field I was hoping it was possible but I've been failing. This is what I tried:

value += mykey + " - " + status + " \n ";

Any ideas how this might work?

Thanks!

3 answers

1 accepted

0 votes
Answer accepted
Seb Kouba March 6, 2015

I thought it would be ridiculous to even try but this works:

value += mykey + " - " + status + " <br> ";
0 votes
Sergey Balakhonov October 24, 2019

In my case (scripted field type "Labels") solution is HTML tag:
<p>

string = "first_line" + "<p>" + "second_line"

0 votes
zaharovvv_suek_ru
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.
February 4, 2019

This works for me:

 

...
    subtask_Names+= issue.getKey() + ", " + issue.summary + " \n <br/>";

...

Suggest an answer

Log in or Sign up to answer