Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,298,803
Community Members
 
Community Events
165
Community Groups

Assign permissions for different user groups for specific issue types

I have different groups of people in my department who have restrictions to perform certain tasks within a project. I cannot use the project permissions to control permissions as this applies to the entire project. I need to assign permissions for different issue types using the user groups. Can you please direct me how to do this?

 

1 answer

Hi @Sally Wheeler and welcome!

I believe you will have to use third party app to help you with this. I am no coder but I do know that this has been done with for example Scriptrunner. Like in the code below, the creation of Issue Type "Story" is limited to those users in the "Product Owner" role:

 

import com.atlassian.jira.component.ComponentAccessor
 
import static com.atlassian.jira.issue.IssueFieldConstants.ISSUE_TYPE
 
def projectRoleManager = ComponentAccessor.getComponent(ProjectRoleManager)
def allIssueTypes = ComponentAccessor.constantsManager.allIssueTypeObjects
 
def user = ComponentAccessor.jiraAuthenticationContext.loggedInUser
def issueTypeField = getFieldById(ISSUE_TYPE)
def availableIssueTypes = []
 
def remoteUsersRoles = projectRoleManager.getProjectRoles(user, issueContext.projectObject)*.name
 
if ("Product Owner" in remoteUsersRoles)
{
allIssueTypes.each { issueType ->
availableIssueTypes.add( issueType )
 
}
issueTypeField.setFieldOptions(availableIssueTypes)
}
 
else {
allIssueTypes.each { issueType ->
if ( issueType.name != "Story")
{
availableIssueTypes.add( issueType )
}
}
issueTypeField.setFieldOptions(availableIssueTypes)
}
HTH,
KGM

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you