Hello everyone,
I have 4 custom single select fields "Region", "Market A", "Market B", and "Market C".
I would like to hide the custom single select fields of "Market A", "Market B", and "Market C" based upon the value I select within the "Region" custom field. (I need to do this without any paid for plug-ins like script runner)
IE: If within "Region" I select the value of 'Region 1', I'd only like "Market A" to show up, and have the other Market custom fields be hidden.
Right now I'm trying to tweak a script I found within the atlassian documentation without any luck; and I believe I'm missing something since these are all custom fields and not a combo of custom and jira system fields.
Here is my coding so far:
JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function(e, context) { console.log("new content added")
<script type="text/javascript">
region = document.getElementById('region');
if (region) {
target = document.getElementById('customfield_10200');
// Hide the target field if Region isn't "Market 1"
if (region.value != 1) target.style.display='none';
priority.onchange=function() {
if (this.value == 1) {
target.style.display = '';
target.value='Value 1';
} else {
target.style.display='none';
}
}
}
</script>
Any help would be greatly apperciated!
Thanks,
Michael