Behaviours Plugin - how to display a blank free-text field if "Other" field is selected.

Pei November 26, 2012

I've been looking at the Behaviours plugin, I want a blank free-text field to appear if "Other" field selection is selected in another field. Unfortunately, I can't get it to work due to my lack code writing knowledge.

1 answer

1 accepted

0 votes
Answer accepted
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 26, 2012

put the validator on the select list. The validator code would be something like:

def selectList = getFieldById(getFieldChanged())
def blankTextField = getFieldByName("Some Text Field")
blankTextField.setHidden(selectList.getValue() == "Other")

You need to create a text field called "Some Text Field" and add to project, screens etc.

Pei November 27, 2012

Thanks for your response Jamie. I haven't gotten a chance to try the validator yet because I came across another issue related to the Behaviour Plugin. I'm working on another project and whenever I tried to create an issue, I receive an error message "Error creating issue: Cannot invoke method getValidators() on null object". If I disable the Behaviour plugin, then it works and I'm able to create an issue. We are using JIRA v. 5.1.7 and I've tried running Behaviour v. 0.5.2 and 0.5.3. Thoughts?

Thank you,

Pei

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events