I would like to disable 'Labels' option from 'More Actions' menu (as picture below), because I can't find this 'Labels' field at the custom field page, and also can't display this field on the issue view screen. Please help me on how to achieve this. Thanks
@Janet Juo I should have added,
This is the way, If you have the script runner plugin, you can do this.
1. Install the script runner plugin(paid) at the Atlassian market place
https://marketplace.atlassian.com/apps/6820/scriptrunner-for-jira\
2. Go to Manage Apps > SCRIPT RUNNER > Fragments > Create Script Fragments > Hide system or plugin UI element
3. Under Hide what "Type label > the module key for the web item is com.atlassian.jira.plugin.system.issueoperations:edit-labels
4. Under conditions enter the below ( it will hide the labels button in only this project.
jiraHelper.project?.key != "PROJECTKEY"
5. If you want to hide for all users in the project except for jira-adminstrators the enter the condition below
import com.atlassian.jira.component.ComponentAccessor
def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
def userUtil = ComponentAccessor.userUtil
def groupName = "jira-administrators"
userUtil.getGroupNamesForUser(currentUser.name).contains(groupName) || jiraHelper.project?.key != "PROJECTKEY"
Kind regards,
Moses
Hi @Moses Thomas ,
Do you know if it is also possible not to show it based on project role instead of user group?
Regards, Marco
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Marco,
You could use the condition
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.web.action.ProjectActionSupport
import com.atlassian.jira.project.Project
import com.atlassian.jira.security.roles.ProjectRoleManager
def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
ProjectActionSupport projectSupport = new ProjectActionSupport();
Project currentProject = ComponentAccessor.getProjectManager().getProjectObj(projectSupport.getSelectedProjectId());
def projectRoleManager = ComponentAccessor.getComponentOfType(ProjectRoleManager)
def role = projectRoleManager.getProjectRole("Administrators")
return ( projectRoleManager.isUserInProjectRole(currentUser, role, currentProject) || jiraHelper.project?.key != "PROJECTKEY" )
Kind regards,
Moses
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marco,
You welcome!
Kind regards,
Moses
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.