Forums

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

How do you troubleshoot missing default values in Multi-line Text Custom field?

Priscilla Achampong April 9, 2020

Hi All,

I'm aware of two options of adding default values to a custom field, by editing the field or using behaviours. Unfortunately the inputted text isn't appearing as expected. 

Custom Field

I updated the custom field directly adding a default value, but the text isn't appearing. I re-indexed the project and restarted browsers, but no joy.

 

Behaviours 

I recycled and tweaked behaviours which already work for other custom fields, but no joy. (script versions below) However, when using script in conjunction with an issue type for a different custom field worked. Although assigning an issue type and using my custom field didn't work.

Version 1:

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.fields.CustomField
import com.atlassian.jira.issue.IssueManager
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.MutableIssue

def desc = getFieldById("customfield_xxxxx")

def defaultValue = """h4. Header One

- Add text here.

h4. Header two

- Add text here.""".replaceAll(/ /, '')

Version 2:

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.fields.CustomField
import com.atlassian.jira.issue.IssueManager
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.MutableIssue

def desc = getFieldById("My Custom Field")

def defaultValue = """h4. Header One

- Add text here.

h4. Header two

- Add text here.""".replaceAll(/ /, '')


Making both updates haven't made the new text appear.

I would appreciate help on how to troubleshoot and ultimately fix this issue.

Thanks.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, loom, loom for training, loom for teaching, video training, async learning, online education, screen recording, loom tutorials, loom use cases, atlassian learning, team training tools, instructional video, virtual training tools

🛗 Elevate Your Training and Enablement with Loom

Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!

Register today
AUG Leaders

Atlassian Community Events