I have a workflow property key that denies the ability to clone: "jira.permission.create.clone.denied" with property value as empty, and it works fine. So I know the syntax 'jira.permission.create.clone' works.
Now I need a certain group to have permission to clone on the same workflow. I have followed these references Atlassian document , Hide-ui-element-built-in-script , and Previous asked questions but none are working. I've created a group called "Clone Access" and added my name to test. I should be able to clone.
In the workflow property key, I've removed the old one and tried:
- jira.permission.create.clone.group='Clone Access'
- jira.permission.create.clone.group with 'Clone Access' as the property value
Then I tried creating a Project Role, also called 'Clone Access" and tried using:
- jira.permission.create.clone.projectrole=10500
- jira.permission.create.clone.projectrole with 10500 as the property value.
In the project's permission scheme, I have tried both the Clone Access (group and project role) allowed in Create Permission. But the workflow property does the opposite effect where I am denied the ability to clone, which is weird. Is there a way to allow cloning permission to only a certain group?
In addition, I have attempted to use ScriptRunner's Hide UI Fragments, but the code hides the clone button from all projects even when I put this under Conditions:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.crowd.embedded.api.Group
def loggedInUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
def groupManager = ComponentAccessor.getGroupManager()
def cloneAccess = groupManager.getGroup("Clone Access")
def cloneAccessUsers = groupManager.getUserNamesInGroup(cloneAccess)
//since the module returns true for entire instance, need to make conditions so that only 1 project and 1 issue type is denied cloning with only the group
if(issue.projectObject?.key != 'ABC' && issue.issueType.name != 'Bug'){
return false
if(cloneAccessUsers.contains(loggedInUsers)){
return false
}
}
Any suggestions?