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,
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.