Custom Issue Type Permission/Security


I have a custom issue type and trying to change the permissions to determine who can create JIRA Issues under that Issue type.  Is it possible?

How can I determine the security/permission levels on the workflows? All I see is Permissions/ Roles under the projects. Where can I change the security/permission level of a workflows?

Thank you!

3 answers

this thread has a couple of solutions.


you can probably also set the properties of the transitions .. some documentation here. You probably need a workflow specific to that one issue type.

For the "Create" transition, you have to do it as a validator, as you can't add conditions to "Create".  This is a minor issue in that, depending on how they reached create, they could have filled in the whole form and not have a way to change the type when it gets rejected.  I still use it though, to keep everything except "Bug" and "Improvement" reserved for people in the Developer's Role:

import com.atlassian.jira.issue.Issue
import com.atlassian.jira.user.ApplicationUser
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.project.version.Version
import com.opensymphony.workflow.InvalidInputException
import com.opensymphony.workflow.WorkflowContext
import org.apache.log4j.Category

def Category log = Category.getInstance("com.onresolve.jira.groovy.PostFunction");
ProjectRoleManager projectRoleManager = ComponentManager.getComponentInstanceOfType(ProjectRoleManager.class) as ProjectRoleManager

ApplicationUser currentUser = ComponentAccessor.getJiraAuthenticationContext().getUser();
ProjectRole devsRole = projectRoleManager.getProjectRole("Developers");
ProjectRoleActors devs = projectRoleManager.getProjectRoleActors(devsRole, issue.getProjectObject());
Boolean isDev = devs.contains(currentUser);
String issueType = issue.getIssueTypeObject().getName();

if (!isDev) {
	if (issueType != "Bug" && issueType != "Improvement") {
        invalidInputException = new InvalidInputException("You are not a member of this project's \"Developers\" role; the only issue types available to non-developers are \"Bug\" and \"Improvement\".");

I pulled some irrelevant code, but hopefully it still works as-is.

Hi Elif,

You can do both by adding conditions on your workflow transitions.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 09, 2018 in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

375 views 6 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