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

Default Comment Security Level broken with JIRA 4.2

    XMLWordPrintable

    Details

    • UIS:
      1
    • Support reference count:
      7
    • Feedback Policy:
      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.

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated: