Want to Restrict creation of Tickets based on Project Role
Asked by Chetan Krishna Sai Naidu/Jira-Admin:

Hi All,

We want to Restrict creation of Tickets based on Project Role. Can anyone help on how to achieve this. Thanks in advance.


Answers:
author: Maciej Dudziak _Forgappify_
body: Hi [@Chetan Krishna Sai Naidu/Jira-Admin](/t5/user/viewprofilepage/user-id/5154541)

If you're open to using apps or already have one providing Jira expression-based validators/conditions, then I think it would be a good option.

For example, if you want only users with the 'Developers' project role to be able to create Story issues, add Jira Expression Validator to the Create transition with following settings:

```
user.getProjectRoles(issue.project).reduce(
   (isAllowed, role) => isAllowed || ["Developers"].includes(role.name),
   false
)
```

Above assumes that you have a separate workflow for the Story issue type.

If you don't have separate workflows, you could do following:

```
issue.issueType.name == "Story" 
   ? user.getProjectRoles(issue.project).reduce(
      (isAllowed, role) => isAllowed || ["Developers"].includes(role.name),
      false
   )
   : true
```

The described case can be addressed using any Jira expression-based validator available on the Atlassian [marketplace](https://marketplace.atlassian.com/search?query=jira%20expression%20validator).

I am from Forgappify, and we developed Jira Expression Validator, which is part of the [Workflow Building Blocks for Jira](https://marketplace.atlassian.com/apps/1233642/workflow-building-blocks-for-jira?hosting=cloud&tab=overview) free app.

I would appreciate it if you could give it a try.

Cheers

comments: author: Jack Brickey
body: Looks interesting


author: Jack Brickey
body: Hi [@Chetan Krishna Sai Naidu/Jira-Admin](/t5/user/viewprofilepage/user-id/5154541) , are you using Company managed project? If so you can control this under project settings \> permissions - create. Just specify the roles that can create.

comments: author: Chetan Krishna Sai Naidu/Jira-Admin
body: Hi [@Jack Brickey](/t5/user/viewprofilepage/user-id/853369) Thank You for your response. Very Sorry for a little confusion here. I would like to allow only some specific role users to create some specific issuetype. for example, user's with BA role should only create Task issue type issue's only.


author: Jack Brickey
body: Ah, that is a different matter altogether then. You cannot do this natively so you would need an addon that could allow you to specify user permission within the Create transition/action of the workflow.


author: Chetan Krishna Sai Naidu/Jira-Admin
body: Hi [@Jack Brickey](/t5/user/viewprofilepage/user-id/853369)

Thank you for your response, can you please suggest any addons you are aware of.


author: Jack Brickey
body: Have a look at this post - [Restrict-Issue-Type-Creation-for-Certain-Users](https://community.atlassian.com/t5/Jira-questions/Restrict-Issue-Type-Creation-for-Certain-Users/qaq-p/1636572)

also search the Marketplace for "workflow validator"


author: Chetan Krishna Sai Naidu/Jira-Admin
body: Thank You so much [@Jack Brickey](/t5/user/viewprofilepage/user-id/853369)


Tags: cloud

jira-service-management

jira-service-management-cloud