I created a database picker field that has a value from one of the columns from the customer table in the database. I have multiple custom fields that I want to make hidden. The only time it should display those fields is if the user selects a value from the DB Picker field.
I would like to have those fields hidden all the time but whenever the user selects a value then those fields should be visible. I mean when it's empty fields should be hidden when there is a value then fields should be visible. I tried a behaviour script but it didn't display fields. Not sure what I'm doing wrong.
import com.onresolve.jira.groovy.user.FieldBehaviours
import groovy.transform.BaseScript
@BaseScript FieldBehaviours fieldBehaviours
def locationName = getFieldById('customfield_15401')
def cusName = getFieldById('customfield_18502')
cusName.setHidden(true)
if(locationName.value == ' ') {
cusName.setHidden(true)
}
else {
nameField.setHidden(false)
}
Thank you for your help
Hi Anna,
You can do it by using Forms for Confluence.
Here, you can find an example.
Kind Regards,
Jose Marques
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.