Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Hide the Comment field in Transition Screen

Pangeel Shubha September 18, 2019

I would like to pop up a message as warning or additional confirmation to the users on a particular transition. To achieve this, I have added a screen on transition with just one field which is of type "Message Field (for edit)". But the comment section appears by default.

As per the instructions in https://community.atlassian.com/t5/Jira-questions/How-to-remove-quot-comment-quot-textbox-appear-by-default-in/qaq-p/294992, I added the below code in the description of the "Message Field" under Field Configuration.

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

 

But the comment section is still visible. Please help. 

 

Regards,

Shubha.

2 answers

1 vote
Sreenivasaraju P
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 18, 2019

Hi @Pangeel Shubha ,

Alternatively, If possible, at this particular status you can disable comment option using workflow properties.

jira.permission.comment.user and make the property value false

 

https://confluence.atlassian.com/jirakb/how-to-deactivate-comments-for-closed-issues-648217599.html

Pangeel Shubha September 18, 2019

This does not seem to work.

Also my purpose is that I want to display ONLY A WARNING MESSAGE in the transition screen without the COMMENT FIELD.

Eric Palmitesta
Contributor
March 25, 2021

Tried jira.permission.comment.user=false and jira.permission.comment.user=denied

Not working for Jira Cloud, as far as I can tell.

Pangeel Shubha May 12, 2021

We achieved this with the Scriptrunner plugin

 

import static com.atlassian.jira.issue.IssueFieldConstants.*

def comment = getFieldById("comment")
if (underlyingIssue.getStatus().name == "SOME STATUS" && getActionName() == "SOME TRANSITION") {
comment.setHidden(true)
}

Like Deepali Kohli likes this
Mario Benedi Plana May 3, 2022

Hi,

 

Have you succeed to solve this in cloud? I don't understand if this is a Listener or a post-function. I can only imagine that's a Behaviour but there are still not available in cloud.

Sreenivasaraju P
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 3, 2022

HI @Mario Benedi Plana ,

You can achieve this with workflow properties at statusproperties.PNG

Mario Benedi Plana May 12, 2022

Hi @Sreenivasaraju P , thanks for the response, but I understand with this property the users can't comment when they are in this status ¿right? The user case is to hide it only in the transition screen.

Like # people like this
0 votes
Alexander Richter
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 29, 2022

Hi, 

if you are using Jira Server/DC you can use our free App STAGIL Hide Comments .

Works like a charme :-)

Best,
Alex

Sascha Hülß April 17, 2025

Hi,

what happened to this APP?

Best regards,

Sascha

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events