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.
I am having trouble wrapping my head around this. The ITSM Request screen is made BEFORE an issue exists. So I think when I am calling field values, they are always showing as null. Is this even possible?
I have tried many different things. But currently I am trying to make a behavior and this is more or less what I am trying. If I run this as an initializer, it ALWAYS hides the Description field. I believe this is because the getFieldByID doesnt exist yet on the ITSM request screen?
(Sorry for the lack of a code block, not sure how to do that here)
def selectListField = getFieldById("Exception Template")
def selectListValue = selectListField.value
def textField = getFieldByName("Description")
if (selectListValue == null) {
textField.setHidden(true)
} else {
textField.setHidden(false)
}
Hoping someone can help guide me!
Figured it out! I needed the customfield nameID, not it's full name. This has some parts added as I changed the functionality from show/head to readonly true/false
def selectListField = getFieldById("customfield_12900")
def selectListValue = selectListField.value
def textField = getFieldByName("Description")
def text = "PreMade Text"
if (selectListValue == "Specific Selector Text Here") {
textField.setFormValue(text)
textField.setReadOnly(true)
} else {
textField.setHidden(false)
textField.setReadOnly(false)
textField.setFormValue(" ")
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.