vendredi 10 janvier 2020

JIRA + Script Runner : template / default Description value

using Adaptavist Script Runner plugin > Behaviour


def desc = getFieldById ("description")

def defaultValue = """ *Some text in bold*
since we have a multiline string, we can put some more
but keep it short, this is a template...
What / Why / How ...""".replaceAll(/ .   /, '')

if (! underlyingIssue.descrption) {
        desc.setFormValue(defaultValue)
}