Remove Comment text box

How to remove the comment text box appear in the JIRA transition view screens (popups)

4 answers

3 votes

Two approaches - nasty code hacks, or you could remove the user's permission to comment on issues (either through the permission scheme to do it consistently, or with workflow properties)

Hi, 

It's a bit of a workaround, but you can do it by editing a custom field appearing on that screen and adding the following code in the description text area:

<script type="text/javascript">
if(AJS.$('#issue-workflow-transition-submit').val() =='Transition Name'){
AJS.$('div.comment-input').css('display', 'none');
}
</script>

Hi kanchana,

It's a bit of a workaround but if you edit a custom field appearing on that screen and put the following code in the description text area:

<script type="text/javascript">
if(AJS.$('#issue-workflow-transition-submit').val() =='Transition Name'){
AJS.$('div.comment-input').css('display', 'none');
}
</script>

It should hide the comment section.

Regards,

Konstantin

Thank you Konstantin! 

You're a legend! I tried so long to do this with plain CSS, and every time i had something disappearing that I did not want. AJS rocks.

if this works on all verions of JIRA, it should be included in the Atlassian documentation, I've been looking for a working solution for quite some time.

Have you tested it on 6.x and 7.x?

 

It's never going to be included in the documentation because it's an unsupportable and unwanted hack which is likely to become unusable in the future.

Agreed with Nic, but a change should be proposed and voted; i think it would be useful for many users.

0 vote
Joe Pitt Community Champion Sep 02, 2016

Remember, the code hack will need to be done whenever you upgrade and it may not be the same each time and once you start management will keep asking for more.  One place I was at had put in over 100 hacks to code and a new release came that was a nearly total rewrite so none of them fit any more. It took nearly a year to reproduce them in the new version.

 

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published yesterday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

72 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you