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, confluence, loom, atlassian intelligence, ai notes, ai-powered meeting notes, atlassian community events, ace, confluence ai, loom ai integration, ai note-taking, atlassian ai features, team '25, atlassian live learning, confluence automation

Unlock AI-powered meeting notes: Join our live learning session! 📹

Did you catch the news at Team ‘25? With Loom, Confluence, Atlassian Intelligence, & even Jira 👀, you won’t have to worry about taking meeting notes again… unless you want to. Join us to explore the beta & discover a new way to boost meeting productivity.

Register today!
AUG Leaders

Atlassian Community Events