I can set the default value for the description field but I'm unable to clear it.
def desc = getFieldById("description")
def issueType = getFieldById("issuetype")
def defaultValue = """Who: user/role
What: description of a feature / workflow / action
Why: benefit / value / reason
Note: Please provide screenshots, mockups, photos of whiteboards, sample files, etc. to better present what needs to be done within the scope of a ticket.
Analysis (Technical) Notes:
Developers provide technical details on implementation, references, code, links, screenshots, etc. here""".replaceAll(/ /, '')
if (! underlyingIssue?.description) {
if(issueContext.issueType.name == "Epic")
desc.setFormValue(defaultValue)
}else if(underlyingIssue?.description == defaultValue && issueContext.issueType.name != "Epic"){
desc.setFormValue("Test")
}This message also pops up
These fields have default values for this project and issue type combination. We have preserved the existing values in case you need them.