Hello,
I added default text to description field via Behaviour plugin.
My code looks like this:
def descField = getFieldById("description")
def defaultValue = """
*Expected result:*"""
if (! underlyingIssue?.description) {
descField.setFormValue(defaultValue)
}
I can add my additional text into this prefilled field, but when I switch to another field to fill in, my added text disappears and just default text stays.
I tried another code with $currentValue, but it's still the same problem.
I also tried to add
descField.setAllowInlineEdit(true)
this option, but still my additionally added text disappears.
Any thoughts what could be wrong and how I can modify my current code that additionally added text would stay in description field?
Make sure that your code is in the Initialization and not in the field behavior. The initialization will set the default text when the screen is first displayed. After that, it won't run. If you put it into the field behavior script, it will run every time the field is updated.
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.