Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×when add new screen in jira then it does not show "comment" field but when associated with transition and appear while actionaning workflow transition then that screen appear default with comment textbox.
As we have added other custom fields and screen does not need comment textbox..
can we remove this ?
thanks
JIRA 6.1.x steps.
Go to Field Configuration
Edit one of the custom fields also appearing on the transition screen wherein you want to hide comment.
Put below JS
<script type=
"text/javascript"
>
if
(AJS.$(
'#issue-workflow-transition-submit'
).val() ==
'Transition Name'
){
AJS.$(
'div.comment-input'
).css(
'display'
,
'none'
);
}
</script>
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.
This worked for me in 6.3.5
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.
Thanks Bhupesh!
Works perfectly in `v7.12.3#712004`, but when saving the field config, the admin page goes blank. Just a refresh and everything is back to normal.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Bhupesh Nagda!
This worked perfectly for me, in JIRA Server 7.11. It hid the comments field on one transition screen only, which is exactly what I wanted.
- in Field Configuration, edited one of the custom fields also appearing on the transition screen
- Put below JS in the 'Field Description':
<script type="text/javascript">
if(AJS.$('#issue-workflow-transition-submit').val() =='my transition name'){
AJS.$('div.comment-input').css('display', 'none'); }
</script>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is above script is working for Jira Service desk,In my case it is working for Jira Software but unfortunately ,it is not working for jira service desk,Can you please help me.
Thanks in advance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi @cgadade
I only tried this in Jira Software, not in Jira Service Desk.
Are you trying to hide comments from the Portal? or from a Transition screen that displays for a JIRA SD project when an issue is transitioned by a JSD Agent?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
<script language="javascript">if(document.getElementById("edit-issue-dialog")){document.getElementById("comment-wiki-edit").parentElement.parentElement.style.display='none';}</script>
Put this in the 'Description' of your custom field. This will hide the Comments field on the 'Edit Issue' dialog, which is where I needed to hide him. It will not hide it anywhere else.
Sure, you can have more null checks, but this works for me in Chrome and IE, so I'm not going to spend more time making it resilient.
I am running JIRA 6.2.2.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ranjit,
I used the above in the description and all it did was update the description with the new text. Is there anything else you would recommend?
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, just for information, when you user this plugin ( Behviours Plugin) to hide the comment, it is hidden everywhere. In my test, if i'm not wrong, you cannot hide it for specific screen. when you view a issue, the comment is always displyed, but not accessible.
In conclusion, you cannot hide this field only when you edit an issue, or attached a file, you cannot use this feature anymore.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can hide comments or other fields using Behaviours Plugin. Lots of features. It is highly customizable (which transition, status, which user etc.) and you do not need to do coding for basic stuff.
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.
no luck.. tried at select Field and Message(edit) field...
have tried by putting script tag and without it..
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.
I have put at description of custom field. also tried by putting at - Field configuraiton - descrition .
but comment box is still appear in issue transition screen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Have you debug it with fire bug, in JIRA 5.2.8, it work fine.
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.
jira 5.2.11 stand alone.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
add the following script in any field description on field configuraion of that issue type which is present on that transition by changing transition name
<script type="text/javascript"> jQuery(document).ready( function($) { JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function(e,context) { callCommentHideFunction(); }); callCommentHideFunction(); function callCommentHideFunction(){ if($('#issue-workflow-transition-submit').val() =='working'){ $(".wiki-edit").hide();
$("label[for='comment']").hide(); } } }); </script>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
its not working.. can you please see below if i missed any thing to add:
Have added that stuff under one of custom field's descrition (under "field configuration"). that field is used in a transition screen where "comment" textbox is appear.
In your javascript snippet, have just changed transition name as "#Send for Peer Review" and not changed any thing else.. my stuff looks as below:
<script type="text/javascript"> jQuery(document).ready( function($) { JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function(e,context) { callCommentHideFunction(); }); callCommentHideFunction(); function callCommentHideFunction(){ if($('#Send for Peer Review').val() =='working'){ $('#comment').closest('div.field-group').hide(); } } }); </script>
what is missing here..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i've used same transition name which is given at workflow transition.
Not included ID like - "Send for Peer Review(11)"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
pls change only transition name(working, if you need to remove comment on working transition then no need to change anything, copy as it is to field configuration) and check the answer again i have modified
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i have tested my code on jira 5.2.5 and it worked fine, i hope it should work on jira 5.2.11 also
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ok. i have used updated script and just replaced "working" with "transaction name" (i.e. given in workflow).
when i use this in field description then after, jira issue just shows me processing icon while actionanig transition so, screen should be open but it just shows processing and unable to open that screen.
(even also, in administrator, custom fields list shows that particular custom field without any "Type", "available context", "screen" , just shows field name.
Have also tried by removing condition and only keep hide statement though same thing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
just to confirm: i use below stuff (where just replaced "Working" with my workflow transition name. (and put this at - Custom field >> edit >> description)
<script type="text/javascript"> jQuery(document).ready( function($) { JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function(e,context) { callCommentHideFunction(); }); callCommentHideFunction(); function callCommentHideFunction(){ if($('#issue-workflow-transition-submit').val() =='Send Peer Review'){ $(".wiki-edit").hide();<br> $("label[for='comment']").hide(); } } }); </script> Please have a look at above script if any issue which i do use.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i just look at firebug...inspect element and scripts .. could not find script in transition screen...(looks like not assocated so, not taking effect... or may not be find correctly at firebug and existed in some script file).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
it's Weired!!, i tested before posting here and it worked fine.
make sure that you have added javascript on field configuration of the issuetype which you are testing.
you can remove the condition and test then it should hide the comment field on all transitions
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.
i am using following code on jira 6.X.X versions, it is working file! $(".comment-input").hide();
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.
I can hide the Comment field on the transition screen. However, it fails to add a comment in the view screen RIGHT after finishing the transition. The reason probably because comment field is hided. So is there a way to make comment field show after you hide it during that particular transition?
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.
How can we add javascript in screen ? , can you please share me some example or stuff and where to write it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
what to do in permission scheme to remove this comment box.
Do you mean by removing comments rights ? but then it will remove from issue view screen - comments too ?
will it be possible to remove just on issue transition screen only through permission scheme?
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.