Using Behaviours to set default description text, following this example https://scriptrunner.adaptavist.com/latest/jira/behaviours-overview.html#_setting_a_default_description
The problem is that it doesn't leave whitespace under the headings for the user to click in and start typing. I can't figure out how to leave an empty line between headings. Anyone have ideas?
Hi @Majken Longlade,
I'm not sure I got your question correctly. but if my understanding right you want one space should be added as a value in new line under heading.
if so you can use like below
\n --> for new line
\t --> for tap space
def desc = getFieldById("description")def defaultValue = """How to reproduce* step 1 \n\t* step 2 \n\t"""if (!underlyingIssue?.description) { desc.setFormValue(defaultValue)}
BR,
Leo
Hi Leo,
Thanks that is what I'm trying to achieve, but it's only working in the text view. It's not working in the visual editor.
I'm on Jira Data Center 7.13.9 and using ScriptRunner for Jira version 5.6.8
Any other ideas?
Hi,
since you set wiki style renderer, will have to find out wiki markup style to achieve this
I haven't worked much with markup styles, following page may give you some idea: https://www.mediawiki.org/wiki/Help:Formatting
but not sure how far these styles will work with jira
I think the visual editor is just stripping the white space. I tried a few things, they all worked in the text editor but not the visual editor.
I ended up using placeholder text.
Try use NBSP symbol, that is working for me.
It looks like you're new here. Sign in or register to get started.