Hi All
Recently I upgraded JIRA 4.1.1 to JIRA 4.4 and started facing some issues with the custom field scripting.
I used control the visibility of the text filed "Blocker Explanation" based on the value of the combo 'priority'. Seems the code doesn't work in JIRA 4.4. Below is the code I used in 4.1.1 ;
---------------------------
<script type="text/javascript">
priority = document.getElementById('priority');
if (priority) {
target = document.getElementById('customfield_10061FieldArea');
// Hide the target field if priority isn't a Blocker
if (priority.value != 1) target.style.display='none';
priority.onchange=function() {
if (this.value == 1) {
target.style.display = '';
} else {
target.value='n/a';
target.style.display='none';
}
}
}
</script>
---------------------------------
Going through some posts, I have tried the below codes too..no luck;
--------------------
<script type="text/javascript">
priority = document.getElementById('priority');
if (priority) {
target = document.getElementById('customfield_10061').parentNode;
// Hide the target field if priority isn't a Blocker
if (priority.value != 1) target.style.display='none';
priority.onchange=function() {
if (this.value == ) {
target.style.display = '';
} else {
target.value='n/a';
target.style.display='none';
}
}
}
</script>
----------------
Do we need to change anything in jira 4.4 ?
Any suggestions would be appricated.
Cheers !!
Vishnu.