Hello all,
I have created a Behaviour Script for a Multi Line Text Field with a default value that can be edited afterwards.
def contentBriefing = getFieldById("customfield_XYZ")
def defaultvalue ="""TEXT
TEXT
TEXT""
if (!underlyingIssue?.description) {
contentBriefing.setFormValue(defaultvalue)
}
But now comes the request: if you have edited the value once (e.g. during ticket creation), saved it and then edit the field again, then the entries should be preserved (the default value should not be displayed again). How can I realize this?
Thanks
Hi @Administrator
I have set up a few behaviours at a customer where the Description field is filled with a template on the create screen. If this is adjusted/added, this will not be overwritten by the behaviour later during an edit.
Sample script:
def desc = getFieldById("description")
def defaultValue = """\
*Impact*:
*Testplan*:
*Roll Back*:
*Contact*:
*Actions*:
""".stripIndent()
if (!desc.formValue) {
desc.setFormValue(defaultValue)
}
Regards, Marco
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
marco
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
formate
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.