So, first I have all of 3 hour of exposure to javascript, so bare with me.
<script type="text/javascript">
jQuery(document).ready(function()
{
checkbox = document.getElementById('customfield_11540-1');
dept = document.getElementById('customfield_11534');
prog = document.getElementById('customfield_11537');
func = document.getElementById('customfield_11533');
// Hide the target field by default
dept.style.display = '';
prog.style.display = 'none';
func.style.display = 'none';
checkbox.onclick=function() {
if (checkbox.checked) {
prog.style.display = '';
func.style.display = '';
dept.style.display = 'none';
} else {
prog.style.display = 'none';
func.style.display = 'none';
dept.style.display = '';
document.getElementById('customfield_11534').value = '';
}
};
});
</script>
Ive pieced together this from previous posting on the subject.
So it does sort of work, the fields for prog and func are drop menus, and it hides the menu part, but not the field label. I read that from Jira4.2 and newer, were supposed to use .parentNode; to include the entire container, that breaks the script in my case. Kind of scratching my head getting the intended outcome.
Disregard, I forgot to refresh my second page that I was using to test the create issue.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.