JIRA comments Viewable by a role or group by default

Sebas December 21, 2011

Is it possible to set comments as Viewable by a role or group by default for a particular project in JIRA?

3 answers

0 votes
pschaff01
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.
October 4, 2013
Hi there,

Actually there is a resolution for this problem, and you can input this code in the "Announcement Banner" section inside JIRA.

<script language="JavaScript">
<!--
var defaultRoleName = "role:10002";
var customRoleSelected = false;

function changeCommentLevel()
{
if (customRoleSelected) return;

var commentLevelSelect = jQuery('.security-level select#commentLevel option[value=\'' + defaultRoleName + '\']');
if (commentLevelSelect)
{ var labelText = commentLevelSelect.first().text(); jQuery("select#commentLevel").val(defaultRoleName); jQuery("#commentLevel-multi-select a.drop span.icon").removeClass("icon-unlocked").addClass("icon-locked"); var htmlEscapedLabel = AJS.$("<div/>").text(labelText).html(); jQuery(".security-level span.current-level").html(AJS.format(AJS.params.securityLevelViewableRestrictedTo, htmlEscapedLabel)); }

}

jQuery('#comment').live('focus', changeCommentLevel);
jQuery('#commentLevel-suggestions').live('click', function()
{ customRoleSelected = true; }

);
//-->
</script>

<style>
.alertHeader
{display:none;}

</style>

We hope this helps!

Regards,

Pietro

0 votes
Jobin Kuruvilla [Adaptavist]
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.
June 26, 2012

It is not possible without doing some coding. The issue is that you can restrict a comment to a group only if you are a member of that group and if that option is enabled globally.

It means it is more than just a Javascript hack.

ION Information Systems June 26, 2012

That's clear, thanks for your quick reply.

0 votes
ION Information Systems June 26, 2012

I am interested in this topic, does anyone know if this is possible?

Thanks

Suggest an answer

Log in or Sign up to answer