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
Posted Oct 16, 2018 in Jira

Looking for anyone who made the switch to Data Center

The Jira Marketing team is putting together an ebook on migrating to Data Center. We're looking for pro tips on how you staffed your project team and organized your Proof of Concept. Share yo...

1,385 views 17 10
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