I want to hide the issue type in a project and i tried script runner behaviour . Here the script below
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.security.roles.ProjectRoleManager
import static com.atlassian.jira.issue.IssueFieldConstants.ISSUE_TYPE
def projectRoleManager = ComponentAccessor.getComponent(ProjectRoleManager) def allIssueTypes = ComponentAccessor.constantsManager.allIssueTypeObjects def user = ComponentAccessor.jiraAuthenticationContext.loggedInUser def issueTypeField = getFieldById(ISSUE_TYPE) def remoteUsersRoles = projectRoleManager.getProjectRoles(user, issueContext.projectObject)*.name def availableIssueTypes = [] if ("Users" in remoteUsersRoles) { availableIssueTypes.addAll(allIssueTypes.findAll { it.name in ["Query", "General Request"] }) } if ("Developers" in remoteUsersRoles) { availableIssueTypes.addAll(allIssueTypes.findAll { it.name in ["Bug", "Task", "New Feature"] }) } issueTypeField.setFieldOptions(availableIssueTypes)
But i'm getting error code is
Parsing XML failed: Unexpected character 'i' (code 105) in prolog; expected '<' at [row,col {unknown-source}]: [1,1]
Also attaching the screen shot below

and we are using script runner version is 5.7.0 and jira version is 7.13.11
Please help me with this where to changes implemented on script
Thanks,
Siva