so i am working on to find a solution to this which is,
ScField = check boxes
A,B,C,D,E,F
TmField - Muliple issue picker
and depending on the option i chose, i created subtasks based on the selection of ScField.
So, If i choose only "c", the TmField should become optional, if i choose the rest of them along with "c"or without "c" . the TmFIeld should become mandatory.
I used this script in behaviours in ScField
def ScField = getFieldById(getFieldChanged())
def TmField = getFieldbyId("customfield_11900")
def SAC = ScField.getValue() as String
TmField.setRequired(!(SAC == "c"))
The Problem i am having is even though when TmField becomes mandatory and has a value in it. when i tried to create a issue. it says "Please enter a value in this field".
Hi @Rahul k ,
This should work. It seems that the behaviours is not updating correctly when you check a checkbox. Have you correctly mapped this script to the ScField in the behaviours configuration ?
Antoine
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Could you please share your exact script and a screenshot of the behaviour configuration ? It would make it easier to debug.
Antoine
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.
Hi @Rahul k ,
I think your screenshot displays an expected result since BTD Epics should only be optional when Infrastructure Change is ticked.
I tested your script and it works fine. However it seems that it triggers when the checkbox is updated, but not at form load. So you might want to add this script in the initialiser, using the id to get sacfield.
Antoine
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.