Forums

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

Cannot modify system field with default value for specific issue type

Jovita Sajonaite July 29, 2019

Hello,

I have added default value to system field "Description" with the behavior plugin help. I mapped this value just to Change request issue type. When I create issue - I want to modify this default value, so I write something additional to "description" field and go to the next field to fill in - everything what I write additional to description - disappears instantly. 

When I do this to another issue types like task, story - I can modify description field (even it has default value with behavior plugin help) and nothing disappears.

So I am wondering, maybe something is turned of for Change request, but what? what I can check ?

Here is the script I am using:

def desc = getFieldById("description")

def defaultValue = """

my text
"""

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

1 answer

0 votes
Tom _Automation Consultants_
Atlassian Partner
July 29, 2019

Put this in the Initialiser, it seems to work on my instance:

 

def desc = getFieldById("description")

def defaultValue = """

my text
"""

if(desc.getDescription() == null || desc.getDescription().equals("")){
desc.setFormValue(defaultValue)
}

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events