Hi,
I have a custom script that will check the value in one custom field and then based on the value, display or hide another mandatory(By Field Configuration) field.
<script type="text/javascript">
issueType = document.getElementById("issuetype-field").value;
if (issueType == "Bug") {
bug_source = document.getElementById('customfield_11737');
if (bug_source) {
customer = document.getElementById('customfield_11740');
if (bug_source.value != '11313') customer.style.display='none';
bug_source.onchange=function() {
if (this.value == '11313') {
customer.style.display = '';
customer.value="";
} else {
customer.style.display='none';
}
}
}
}
</script>
This is working fine on the create screen if the customfield_11737 is initialized with the correct value. However, if I move an issue from another issue type to bug, it mandates my second field, even if the value on the first field is wrong.
Is there any better way, I can display/hide a mandatory field based on the value in the other field?
TIA
Thanks,
Dipu H