Forums

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

How to make a whiteline/line break in card description using Scriptrunner Behavior

Brian Taylor
Contributor
May 8, 2018

I have tried to force a new Line break in the description but can not get it to work correctly

I have tried the standard \\ after as well as \n and nothing appears to work - am I missing something


def desc = getFieldById("description")

def defaultValue = """**AS A:*
*I WANT*
*SO THAT*

*COS:*
\\
\\
*How to Accept:*""".replaceAll(/ /, '')

if (! underlyingIssue?.description) {
desc.setFormValue(defaultValue)

 

1 answer

1 accepted

3 votes
Answer accepted
Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 10, 2018

Hi Brian,

I Believe the formatting you are looking for is a quad backslash "\\\\" .

 

Check out this previous community post with a similar scenario:

-Earl

Suggest an answer

Log in or Sign up to answer