I have an edit screen for a custom issue type that uses multiple tabs to keep the interface clean. This makes it easier for the user to find which information they need to edit without scrolling a bunch.
Unfortunately, at the bottom of every last tab is a Comment input, and this is making the simplified inteface rather confusing. "What is this comment I'm being asked to enter?" Comment is really irrelevant in this context.
How do I turn off the Comment field on an edit screen? If this is not possible, can I explicitly assign the comment to a particular tab? Thanks!
-danny
Legitimate solution:
Visit https://jira.atlassian.com/browse/JRA-12244 and vote for this feature. Wait 3-20 years.
Impatient solution:
Add the following bit of code to the description of a field that will appear in the screen you want to fix:
<script type="text/javascript">
function hideCommentField() {
var elements = document.getElementsByClassName('field-group aui-field-wikiedit');
elements[0].style.display = 'none';
}
// http://stackoverflow.com/questions/807878/javascript-that-executes-after-page-load
if(window.attachEvent) {
window.attachEvent('onload', hideCommentField);
} else {
if(window.onload) {
var curronload = window.onload;
var newonload = function() {
curronload();
hideCommentField();
};
window.onload = newonload;
} else {
window.onload = hideCommentField;
}
}
</script>
Upon loading the page, the Comment field will be swept under the rug.
Is not working for me. I'm on JIRA 5.1.
I tried this scrip since yours has some stuff that shouldn't be there, or atleast doesn't show well if copied and pasted:
<script type="text/javascript">
function hideCommentField() {
var elements = document.getElementsByClassName('field-group aui-field-wikiedit');
elements[0].style.display = 'none';
}
if(window.attachEvent) {
window.attachEvent('onload', hideCommentField);
} else {
if(window.onload) {
var curronload = window.onload;
var newonload = function() {
curronload();
hideCommentField();
};
window.onload = newonload;
} else {
window.onload = hideCommentField;
}
}
</script>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We are using a 'Message Edit' custom field and set the default value to
<style>
.comment-input { display:none; }
</style>
and add this to the screens where we want to remove the comment input box.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm on a demo version of JIRA testing this out.
I created a "Message Custom Field (for edit)" custom field with a blank description, went into Configure->Set Default Value, set the default value to
<style>
.comment-input { display:none; }
</style>
then I set it to a default issue screen used globally (since this is just a throwaway), but I'm still seeing the comment section on Edit screens for all ticket types. Any idea where I'm going wrong?
Edit: If I go into Configure Fields->Custom->Where is my field, it is listed as being present in the view. Also I know in Configure Fields I can simply uncheck Comments, but at this point it is the principle of the matter.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am completely new to Jira.
Can anyone provide some screenshots on how to do this?
Because we have 4 tabs for our issues and on each tab there is the comment field and it is quite annoying.
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I injected the following CSS as "Banner" to hide the comment field on a certain Transiton
<style type="text/css">
/* Transition: Transition-ID461 */
#workflow-transition-461-dialog .comment-input {
display: none;
}
</style>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
A little late, but I was able to ahve this working in Jira 6 and 5 withJQuery:
$(document).ready(function() {
myFunction();
});
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.