Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How can I add a linebreak to a scripted field?

Seb Kouba
Contributor
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
Contributor
March 6, 2015

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

value += mykey + " - " + status + " <br> ";
0 votes
Sergey Balakhonov
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 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
TAGS
AUG Leaders

Atlassian Community Events