Disable the Clone button

K September 23, 2015

Hello Community:

In a issue ticket, when users can click More Actions > Clone. However, I want to even delete the Clone link if an issue belongs to a certain project. 

 

I need more information.

 

Thanks

5 answers

1 accepted

0 votes
Answer accepted
Rodrigo Rosa
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 23, 2015

Hello Jose,

 

We have this feature request to disable the clone button. Please feel free to vote for it and add yourself as a watcher of it. smile

Also, you can try the workaround described there!

K September 24, 2015

Thanks Rodrigoit works

Dakota VanLoan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 29, 2020

hi

1 vote
Phillip Ponzer [Cprime]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 7, 2017
Susan Seidlitz June 29, 2017

This worked great for me! Just what I was looking for!! Thanks!!

0 votes
Dakota VanLoan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 29, 2020

thats a good pont

0 votes
mfabris
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 22, 2018

I was working on this today and I have no scriptrunner nor custom plugins

But I found a JQuery workaround that works just fine

 Solved like this: I have created a customized field configuration to apply to my project where I want to hide the entries from the "More" menu.

Then I have added in the description of the "Labels" field (which is available in every ticket) 

<script>
// this script removes menu elements from the XYZ project
$(document).ready(function(){
$("#toggle-vote-issue, #issue-to-subtask, #clone-issue, #edit-labels").parent().css("display", "none")};
});
</script>

 

This removes "vote issue", "issue to subtask", "clone", "labels".

 

 

0 votes
Nick September 23, 2015

We achieved this by using some javascript in a plugin to hide the menu item:

var plugin = {

...

    hideClone : function() {
		if (/* Check you have right project by finding it in dom and comparing to your desired project */) {
			AJS.$(".trigger-label").each(
					function(index, element) {
						var transitionName = AJS.$(element).text().trim();
						switch (transitionName) {
						case "Clone":
							plugin.hideMenuItem(element);
							break;
						default:
							// do nothihng
							break;
						}
					});
		}
	},
	hideMenuItem : function(element) {
		AJS.$(element).parent().parent().remove();
	},

...

AJS
    .toInit(function() {

...

        plugin.hideClone();
    });

	...

}
Saravanan Ravikumar October 23, 2015

Hello, Could you provide more details: Where to deploy this script? under which folder path? Where to specify the Project name in the script Regards

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events