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.
Hello there,
We are using three fields in the create screen and they are
Upgrade (single select single choice), values are None, Yes, No, SC and ST ("customfield_1112")
Base version (text field single line) ("customfield_113")and
Final version (text field single line) ("customfield_114")
When the Upgrade value is other than None, I need the Base version and Final version fields to be filled in. If the Upgrade value is None, there is no need for the required field. Please assist me with this; I'm new to scripts and your assistance is greatly appreciated. Please let me know if you need any information on this.
Note: We are using the Scrip runner plugin in my server instance and help me how to solve this issue.
Thanks,
Siv.
Hi @siva
Check out the answer in https://community.atlassian.com/t5/Adaptavist-questions/ScriptRunner-behaviour-for-hiding-a-field-based-on-another/qaq-p/1755119 and use
.setRequired(true)
as required for your use case.
Trying scripting as a newbie could be daunting.. But trust me, once you are able to understand the given script and modify it for your use case, it opens many doors :)
Hi @siva Kindly try to apply Behaviour on Upgrade field.
As suggest by @Fazila Ashraf , you only need to replace .setHidden with .setRequired
def dropDown = getFieldById("customfield_12345")//Change field ID as per your instance
//define base version field
def baseVersion = getFieldById("customfield_67891") //Change field ID as per your instance
//define Final Version field
def finalVersion = getFieldById("customfield_66666") //Change field ID as per your instance
//apply condition on select list field
if(dropDown.getValue()== "None"){
baseVersion.setRequired(true)
finalVersion.setRequired(true)
} else {
baseVersion.setRequired(false)
finalVersion.setRequired(false)
}
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.