I was able to add the default description. But, when a user edits the field and clicks away from it, it'll default back to the default value. Is there a way to check if the value has been changed?
def desc = getFieldById("description")
def currentIssueType = issueContext.issueType.name
def empty = ""
def defaultValue = """default value""".replaceAll(/ /, '')
def bugDefaultValue = """
default value2""".replaceAll(/ /, '')
if (! underlyingIssue?.description) {
if(currentIssueType == "Epic" || currentIssueType == "Story"){
desc.setFormValue(defaultValue)
}else if (currentIssueType == "Bug"){
desc.setFormValue(bugDefaultValue)
}else{return}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.