Issue type restriction according user

We want to create a condition were a specific user can create a specific issue type. We know we have to create a validator in the workflow, but we don't know how shall we construct the script validator.

In our scenario, we have a user which has to create only bugs, in the same projects there are more issue types available. But we are restricting this user that he can only create 'bugs' as an issue type.

Can you please help

3 answers

This widget could not be displayed.

Hi Charlot,

You can do this using the Power Scripts add-on.

There is a video tutorial walking you through in detail here.

Code is simple:

string [] testers = usersInRole("TEST", "Product Development Tester");

string error = "You do not have permission to create this issue type!";

if(elementExists(testers, currentUser()) && type != "Story") {
    return false, "error", error;
This widget could not be displayed.

You need to have two workflows.  One with a validator on the create transition that simply says "if user does not match a rule, return false" (I'd recommend you also return an error message for them).  The other one does not need a validator.

Use the one with the validator for most issues, and the other one for bugs.

Hi Nic,

Thanks a lot for your reply.

Can you please let me know how to implement the validator rule. Should it be a scripted condition or a user permission validator ?

I have implemented two different workflows.

Thanks a lot,

This widget could not be displayed.

Hi Charlot,

Can you describe a bit more about the restrictions you require? Is it literally just 1 user that you want to limit to only creating bugs or is it 2 different types of users? If the latter then do you have them split out by groups or roles etc?

I have a user which I want to restrict issue creation restriction according to the issue type. In my case user "a" can only create bug issues. I have created a specific workflow for issue type bugs. Now I want that this particular user to create only bugs, creation of other issue types would not be possible with this user.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

148 views 2 0
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you