Set default comment visibility

I have a couple Jira projects that it would be beneficial to set the default visibility on commenting to the developer project role. Ideally I'd like to be able to set this seperately for the current assignee (which I'd like to leave at default visibility) and the rest of the developers. Is there a ready way to do this?

9 answers

1 accepted

This widget could not be displayed.

Hi,

For modify default visibility comment I do this:

Edit file:

/[FOLDER OF JIRA]/atlassian-jira/WEB-INF/classes/templates/jira/issue/field/comment-edit.vm

This is original:

#if ($commentLevel)
#set ($selectedCommentLevel = $commentLevel)
#else
#set ($selectedCommentLevel = "")
#end

This my code modified:

#set ($selectedCommentLevel = "role:10100")

#if ($jiraUserUtils.getGroupNamesForUser($authcontext.getLoggedInUser().getName()).contains("client-users"))
#set ($selectedCommentLevel = "role:10101")
#end

This code set default visibility comment to role 'Developers' (where role number is 10100) and if user is in group 'client-user' in my JIRA, the default comment visibity is role 'Clients' (where number roles i 10101).

Thanks for help Daniel, works great.

This widget could not be displayed.

Hi Tim, there's a js workaround mentioned in this answer:

https://answers.atlassian.com/questions/135332/the-comment-visibility-default-selection-can-be-configured

It's the same that it is mentioned in this issue:

https://jira.atlassian.com/browse/JRA-9091

This widget could not be displayed.

Hey Tim,

To answer your question "Is there a ready way to do this?"

The permissions available for comments are

1. Add comments

2. Edit all comments

3. Edit own comments

4. Delete all comments

5. Delete own comments

These permissions can be set in the permission scheme being used by your project.

For more info refer to https://confluence.atlassian.com/display/JIRA/Managing+Project+Permissions

There is a feature request you might be interested in voting for

https://jira.atlassian.com/browse/JRA-12347

This widget could not be displayed.

Thanks for help Daniel, works great.

This widget could not be displayed.

Hi, I realise you have found your answer but for others looking for an answer where they don't have to edit files or want project level default then I have a paid plugin in the marketplace called comment security default (https://marketplace.atlassian.com/plugins/com.redmoon.jira.comment-security-default). This allows you to set a default globally or per project. You can also assign behaviour in case the permission is no longer available (you can force the user to choose a new permission). The default can be set for adding a comment, adding an attachment, logging work, linking issues and editing issues.

Thanks

Paul

This widget could not be displayed.

there is no comment-edit.vm in JIRA 6.3.14

This widget could not be displayed.

Hi,

Please help. 

I can't find comment-edit.vm in JIRA 6.4.5. 

 

Thanks

Ganga S

I found them here...

/[FOLDER OF JIRA]/atlassian-jira/WEB-INF/classes/templates/plugin/comment/

 

Hi,

 

I cannot find the file comment-edit.vm in JIRA 7.1.6.

Please help.

 

Thx

This widget could not be displayed.

*comment-edit.vm* has been replaced by *system-comment-field-edit.vm* (atlassian-jira/WEB-INF/classes/templates/plugin/comment/system-comment-field-edit.vm).

 

Could someone please turn this into an add-on for cloud so those users could benefit by it?

This widget could not be displayed.

Hi,

Thanks Daniel for your post.

This is working perfeclty for us in 7.4.3.
But I have still an issue...

If I add an comment with a different role and then want to add another comment, the default is not the one defined in the .vm file but the last used.

Is there a way to avoid this and always use the role from the file?

Thank you very much,

Marius

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

292 views 5 0
Join discussion

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