I want to do this script but with groovy script using script runner. Is it possible? How would it look like?
<script type="text/javascript"> priority = document.getElementById('priority'); if (priority) { target = document.getElementById('customfield_10000'); // Hide the target field if priority isn't critical if (priority.value != 2) target.style.display='none'; priority.onchange=function() { if (this.value == 2) { target.style.display = ''; target.value="enter message here"; } else { target.style.display='none'; } } } </script>