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

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;

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,

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
Community showcase
Published Wednesday in Jira

Make your Atlassian Cloud products more secure: our NEW admin security guide

Hey admins! I’m Dave, Principal Product Manager here at Atlassian working on our cloud platform and security products. Cloud security is a moving target. As you adopt more products, employees consta...

72 views 0 3
Read article

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