You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
For a project behavior is mapped with initializer method to set the default value for cascading list. When the issue is created and values are selected for that field it works fine but when we edit the issue in the edit screen default values are set again but not the selected values for the field and message displayed like
These fields have default values for this project and issue type combination. We have preserved the existing values in case you need them.
Build product:
Hello @Shivakumar Hiremath ,
To my understanding, the initializer script will always run upon screen load. This means that it will overwrite any existing values that you have while editing.
Perhaps you can write a condition to check if the custom field is empty before setting the default value.
An example below:-
def description = getFieldById('description')
def descriptionValue = description.getValue()
def defaultText = "This is a default text."
if (descriptionValue.isEmpty()) {
description.setFormValue(defaultText)
}
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.