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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.