How to set the Security Level of an issue based on group membership

Still need help?

The Atlassian Community is here for you.

Ask the community

Problem

There is a desire to have an issue to have a security level set based on whether the reporter of the issue belongs to a group that is in the security level.

Resolution 1

  • Login as Admin to JIRA.
  • Navigate to: Project page > Administration.
  • Go to Permissions > Actions > Select Edit Permission.
    • In the permissions page, find "Set Issue Security Permission" and add the same people or groups that were in your Security Level.
    • Add the Security Level Field to your create and edit screens.

Now if you create issues, members with the permission would be able to select the *Private* permission to ensure that others who do not have the permission cannot view the issue and at the same time they cannot set issues to the private permission.

Resolution 2

You can automatically select a security level using an add-on. Below is one way to set this up using the popular add-on Script Runner. Please note that we do not provide technical support for this add-on so if you encounter problems you may need to contact the add-on vendor.

  1. Create a copy of the current workflow.
  2. Edit the Workflow:
  3. On the transition from Create to Open, click on it and select post function.
  4. Select Add Post Function.
  5. Select Script Post-Function and Press Add
  6. Select "Set Issue Security Level depending on Provided condition"
  7. Select Expand Example and Select "Reporter is a member of a particular group". Edit the name of the group in the textfield to match the name of your group.
  8. Select the name of the Security from the Drop Down.
  9. Select Add.
  10. Associate the Workflow with your project.

Now when members of the group create an issue the Security Level will be set to the one you configured for this post-function.


Resolution 3

This is another add-on which could update the security level via Automation.

  1. Go to Project settings > Project automation
  2. Click on Create rule
  3. New trigger: Issue created
  4. New Condition: User condition
    1. User - Reporter
    2. Check to perform - User is in group
    3. Criteria - <your group names>
  5. New Action: Edit issue
    1. Choose "Security Level" field from the drop-down menu

Notes: The default Security Level must be "None". If not, the default security level will overwrite the update of automation.

JIRA Cloud: Automation Lite for Jira Cloud

JIRA Server: Automation Lite for Jira

Pro version (Cloud & Jira): Automation for Jira


Last modified on Mar 21, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.