Hello Team,
I have a requirement where if security level is set as "Customer Request" then the reporter should not be from the group "ABC_Internal"
I have to set a custom validator script to achieve this
Can the adaptivist please help me in achieving this .?
You need to check it in the script according to your security level Id.
See this script:
import com.atlassian.jira.component.ComponentAccessor
import com.opensymphony.workflow.InvalidInputException
def groupManager = ComponentAccessor.getGroupManager()
def customFieldManager = ComponentAccessor.getCustomFieldManager()
long issueSecurityLevelId = issue.getSecurityLevelId()
long customerRequestSecurityLevelId = 10000 //change here your Customer Request Security Level Id
if (issueSecurityLevelId == customerRequestSecurityLevelId) {
if(groupManager.isUserInGroup(issue.getReporter(), "ABC_Internal")) {
invalidInputException = new InvalidInputException("if security level is set as 'Customer Request' then the reporter should not be from the group 'ABC_Internal'");
return null
}
}
In order to find and modify 'customerRequestSecurityId' param, go to your Issue Security Schemes > edit the scheme (Security Levels) > edit the security level > in the URL you have 'levelId' param- this is the security level id.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have one project and one security level scheme. The security level scheme includes two security levels such as Level 1 and Level 2. Level 1 is arranged with "group_X" and Level 2 arranged with "gorup_Y", In addition.
I need a validator for project workflow. If the reporter is not in security level groups (group_X or group_Y), the reporter will give an error message and the reporter cannot create the issue.
Can you help me ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.