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
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
I am struggling to find a behaviour script in adaptavist scriptrunner and other sources. Kindly help me the similar script
I need a script like if I choose a particular value in a field then the mandatory tab (which is already existed ) has to be non mandatory.
Assuming the fields is not flagged as required (all fields must be set to optional) in the project's field configuration a script like this should work:
def busDriverFld = getFieldByName('Business Driver')
def tabFieldNames = ['ID Impact', 'Product Impact', 'PD Houses']
def requiredBySelection = busDriverFld.value != 'Business services'
Be sure to confirm the spelling of all field names and values (including correct case).
Tabs do not have an optional/mandatory setting, but they look like they do when they contain a mandatory field.
Behaviours can not make a field optional if it is set mandatory in Jira - the mandatory setting is checked on the server-side as the issue is created, and Behaviours can't get to that.
So, to make a tab "optional", you have to make all the fields within it optional in the field configuration.
You can use Behaviours to completely hide a tab, but you'll need to have all the fields on it optional.