I have 5 fields. 3 radio button fields and 2 text fields. Initially, only one field should be displayed when Create button is pressed. With the behaviours plugin and the initializer, I was able to hide the other 4 fields.
Now, when I click on the 1st radio button field, the second radio button field should be displayed. How do I achieve it? Could you please help me here?
Thanks
Udaya
The fields are displaying correctly now whenever another field is being selected. But when I click on the Create button, nothing is happening. The ticket is not getting created, What might be the issue? Could you please let me know?
I got this to work using Behaviours plugin. It works excellently.
Udaya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Looks like there is something I am doing wrong here. This is what I am performing right now:
We are using Script Runner 3.1.4 version on JIRA 6.4.12
I have the following custom fields:
Steps:
FormField selectRequirement = getFieldByName("Select a Requirement") selectRequirement.setHidden(True) FormField selectAction = getFieldByName("Select an Action") selectAction.setHidden(True) FormField enterPurpose = getFieldByName("Purpose") enterPurpose.setHidden(True)
def selectServiceType = getFieldByName("Select a Service Type") def selectRequirement = getFieldByName("select a Requirement") if ((selectServiceType.getValue() == "Voice") || (selectServiceType.getValue() == "Data")) { selectRequirement.setHiddent(false) } else { selectRequirement.setHidden(true) }
Could you please let me know what is my issue here? I would appreciate your help in this matter.
Thanks
Udaya
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.
Thanos:
Good Morning!!! We are using the last available free version of Script Runner. I do not know the version but I will be able to provide it to you right after I get to work. On my way to work now.
Thanks
Udaya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You can 'attach' a behaviour to your radio btn and in the serve rside script use the follow script
def radioBtn = getFieldByName("radio btn") def description = getFieldByName("Test Hide") if (radioBtn.getValue() == "Option1") { description.setHidden(true) } else { description.setHidden(false) }
Can I ask you which version of SR you use ? Because the behaviours plugin was merged to SR in a very early version.
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.