Guys,
I used to use the beow script in JIRA 4.4.1 to alter the visibility of a custom field based on another one.
<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 == 1) {
target.style.display = '';
} else {
target.value='n/a';
target.style.display='none';
}
}
}
</script>
The above script doesn't work with JIRA 5.1.3. Do I need to change anything in the script ?
Thanks, Vishnu.
Perhaps is the same case as in this question: How do you embed JavaScript for a custom field in Jira 5.x
Or, this documentation in the Atlassian Developers site may help: How do you embed JavaScript for a custom field in Jira 5.x
It works, sometimes doesn't. Anyway, thanks for the hint.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check the following post
https://answers.atlassian.com/questions/47843/strange-javascript-problem-in-create-screen
let me know if it not worked!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Got it !!
It works when you create issue first time. It doesn't work if you use the new feature 'Create Anotther One' up on succession. The reason can be, new Jira doesn't reload forms but it just clear the forms for new issue creation.
Is there any workarround to fix this ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is it not working while editing? None of this will work with inline edit for sure.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's not working even in the create issue screen :(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is the javascript firing? Any error? Time for debugging ;)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.