Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-23365

Default Comment Security Level broken with JIRA 4.2

XMLWordPrintable

    • 1
    • 7
    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      NOTE: This suggestion is for JIRA Server. Using JIRA Cloud? See the corresponding suggestion.

      See our documentation: How to Set Default Comment Security Level.

      NOTE: There is a workaround in Javascript for this problem for recent releases (last time tested in 6.1), which can be also applied in the Announcement banner section. Here follows the code:

      <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>
      

      Don't forget to change the "role:10002" value to the actual role value you need or to "group: xxx" in case you want to use a group.

              Unassigned Unassigned
              dmeer Dennis Kromhout van der Meer (Inactive)
              Votes:
              55 Vote for this issue
              Watchers:
              54 Start watching this issue

                Created:
                Updated: