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:
Then I tried creating a Project Role, also called 'Clone Access" and tried using:
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?
Hi @Diana Gorv
Here's a reference to a KB article: How to restrict issue cloning in Jira
Basically, it says: "Jira doesn't have a Clone permission, only a Create permission."
@Dave Mathijs Thank you for the quick response!
Oh I see!
My final solution for future users with similar questions:
One more question, does this workflow property key also affect with ScriptRunner's listener scripts? For example, if there is a listener script that auto-creates an issue if a custom field was selected on the parent issue, does the workflow property key take precedence over Scriptrunner's custom scripts? Meaning, unless the user was in the Clone Access group, the listener script will not function?
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.