Hello,
I have the following script that I would like to use in "Script Fragments", provided by scriptrunner.
It's purpose is to prevent the "Move" issue button from appearing on the "More" option list, when a certain select list field has a certain value:
import com.atlassian.jira.component.ComponentAccessor
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def ReqProject = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Requesting Project")
def ReqProjectValue = issue.getCustomFieldValue(ReqProject)
def project = issue.getProjectObject().getKey()
return !(ReqProjectValue == "Solution1" && jiraHelper.project?.key in ["TP"])
I'm not sure what the problem is, as it is not throwing any errors, but it also does not hide the "Move" option, for that project, when the field 'requesting project' has that certain value.
Please let me know if you have any suggestions.