Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

I want to restrict request type creation basis user groups

SysAdmin November 11, 2025

Hi,

There is a particular request type which should be created by a specific user group.

The request is created from the portal.

We have created a scripted validator but that is not working.

The customer permission of the project says Customer who have an account on Jira site can create the request. We cannot change that option.

This JSM Datacenter v5.4.1 and Jira version is 9.4.1

The scripted validator is as below


import com.atlassian.jira.component.ComponentAccessor

def user = ComponentAccessor.jiraAuthenticationContext.loggedInUser
def groupManager = ComponentAccessor.groupManager

// --- CONFIGURE ---
def allowedGroup = "service-desk-approvers"            // group allowed to create
def restrictedRequestType = "Network Access Request"   // request type to restrict
// ------------------

// Get Request Type value from hidden JSM field
def reqTypeCF = ComponentAccessor.customFieldManager.getCustomFieldObjectByName("Customer Request Type")
def requestType = issue.getCustomFieldValue(reqTypeCF)?.toString()

// If it’s not the restricted request type, allow it
if (requestType != restrictedRequestType) {
    return true
}

// Validate group membership
def isInGroup = groupManager.isUserInGroup(user, allowedGroup)

return isInGroup

 

Can you kindly help with this?

 

Regards,

 

1 answer

0 votes
Akhand Pratap Singh
Community Champion
November 11, 2025

Hello @SysAdmin ,

Good Day, Welcome to Atlassian Community!!

You can refer this Document: https://confluence.atlassian.com/servicemanagementserver/restricted-request-types-1453424836.html 

I believe it is available for version 10.10 or above based on this ticket https://jira.atlassian.com/browse/JSDSERVER-195 (I will suggest upgrading your JSM DC version as a best practice)

 

Best Regards,
Akhand pratap Singh

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
5.4.1
TAGS
AUG Leaders

Atlassian Community Events