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 Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,796 views 11 18
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot