Hello,I have two roles in Jira system (developers, testers). I want testers can only create/edit/view/delete bug issue type (other issue type i.e. user story they can view only). Is it possible in Jira v7.8? How can I set it up easily?
Thank you
Hello @Martin Cerny
Welcome to the Community
Please check following links, may be it help you!
-https://confluence.atlassian.com/display/JIRA/Configuring+Issue-level+Security
-https://confluence.atlassian.com/display/JIRA/Setting+Security+on+an+Issue
HI @Martin Cerny
Actually, we can not control on basis of issue type in Jira. permission scheme will apply for all the issue type.
I don't think so this will be possible.
As reference documents were given by @Mark Markov which is related to issue security level but not the restricting to create/edit/delete issue in jira.
Issue security levels are created within issue security schemes and let you control which user or group of users can view an issue.
Hey,
Check it here
https://community.atlassian.com/t5/Jira-questions/Restricting-issue-creation-of-certain-Issue-Types-based-on-user/qaq-p/701283
You can also use the script in a postfunction on Create transition. Script will check the user if it belongs to particular group or role and set the Issue Type values.
As mentioned above, you can use Issue Security Schemes to prevent certain groups of users from viewing issues. You need to set Issue Security level on each issue.
This however doesn't prevent any users from creating issues. For this you could add a validator on the 'create' transition in the workflow, to check the user is in the required project role.
Thank you for tips. I am now able to restrict create action for ceratin issue type for not admin users (I not sure if the below works for specific user group, but it is fine for me now).
But how to restrict edit action? The process above cannot be applied. Any hint?
Hi @Martin Cerny
You can restrict edit action to groups with workflow status properties.
Check this article:
https://www.j-tricks.com/tutorials/permissions-based-on-workflow-status
Hi,
Check https://www.j-tricks.com/tutorials/permissions-based-on-workflow-status
Hi Martin,
I solved this issue using Script runner's behavior, used below code in initializer and it showed Issuetypes based on logged in user, you can validate user against project roles or even groups
import com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.security.roles.ProjectRoleManagerimport static com.atlassian.jira.issue.IssueFieldConstants.ISSUE_TYPEdef projectRoleManager = ComponentAccessor.getComponent(ProjectRoleManager)def allIssueTypes = ComponentAccessor.constantsManager.allIssueTypeObjectsdef user = ComponentAccessor.jiraAuthenticationContext.loggedInUserdef issueTypeField = getFieldById(ISSUE_TYPE)def availableIssueTypes = []//use this def and if code to check project roles/*def remoteUsersRoles = projectRoleManager.getProjectRoles(user, issueContext.projectObject)*.nameif ("Testers" in remoteUsersRoles){availableIssueTypes.addAll(allIssueTypes.findAll { it.name in ["Task", "Experiment"] })}*///use this def and if code to check groupsdef remoteUsersRoles = ComponentAccessor.getGroupManager().isUserInGroup(user, "jira-administrators")if (remoteUsersRoles) {availableIssueTypes.addAll(allIssueTypes.findAll { it.name in ["Task", "Experiment"] })}else {availableIssueTypes.addAll(allIssueTypes.findAll { it.name in ["Task"] })}issueTypeField.setFieldOptions(availableIssueTypes)
Hope this helps.
Regards,
Priyanka
Not the OP, but this was super helpful to us at Airbnb today! Thank you for sharing, saved us the time of figuring it out ourselves
Happy to know it helped
@Priyanka Lavania
Hi Priyanka,
this was working fine,
My task is to restrict specific users in groups restricted from creating certain issue types
EX: STORY
for a specific PROJECT.
any suggestions or extension of the script ??
This used for disable issue type. for this you can use this code in the Jython script
===========================================================
import com.atlassian.jira.component.ComponentAccessorfrom com.atlassian.jira.component import ComponentAccessor
if issue.getIssueTypeObject().getName() == "Issue type name":description = 'This issuetypes can no longer be created. Please use a different Issue Type.'result = False
============================================================
anyone know how to restrict a user from creating some issue type of the project in jira cloud??
It looks like you're new here. Sign in or register to get started.