Can we remove the 'Assign; button in the View Issue page. in Jira 4.4.5

Harish October 15, 2012

Hi Team,

Please let me know if we can remove or disable the 'Assign' button form the View Issue Page.

We do not want the users to explicitly assign an issue to others. Only during the transitions the assign feature is required.

I tried removing the 'Assign issues' permission for the User group, but this disables the 'Assign to Me' button and more over cannot assign in the Create Issue page also.

Please suggest to only remove the 'Assign' button from the View Issue Page in Jira 4.4.5

8 answers

1 accepted

2 votes
Answer accepted
Renjith Pillai
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.
October 15, 2012

Takeout the permissions for Assign Issues for everyone in the Project Permissions. This will get rid of the button.

And this permission is not used if you add the Assignee field in transitions.

Harish October 16, 2012

Hi Renjith,

I have tried that option.

But removing the 'Assign Issues' permission is disabling the Assignee filed in the transistions.

Any other workaround ?

Thanks, Harish

Renjith Pillai
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.
October 16, 2012

Oh, my bad, sorry for misleading!

How about putting this in the announcement banner?

<script type='text/javascript'>
AJS.$(document).ready(function() {
        AJS.$("#assign-issue").hide();
});
</script>

Özerk Dolanbay February 10, 2014

Hi,

It doesn't work in IE8, any idea?

Renjith Pillai
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 19, 2014

No idea. I guess both IE8 and JIRA 4.4 are EOL and probably not worth investigating. What do you say?

Hung Nguyen March 12, 2015

This works in some cases (when you first view the bug), but then doesn't work in subsequent cases after you go to the bug view from a search list, or after finishing an edit from Editing dialog. Is there any way to make it work better in all cases?

Adam Barylak
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.
March 16, 2015

If you want the Assign button to stay removed even after the edit dialog or a transition screen, please see my solution below. It attaches the javascript code to any updates to the div within the page and then re-hides the elements. It is the only way to remove the buttons without removing the permissions.

3 votes
Bhushan Nagaraj
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.
October 15, 2012

Hi Harish,

Go to "Administration" and go to plugins.

In System plugins find "Issue Operations Plugin".

Click "Manage plugin modules" and disable "View ops bar assign link"

Harish October 16, 2012

Hi Bhushan,

Thanks for the response.

I have tried the steps given. However was not successful. I could not find the 'Manage Plugin modules' option when i clicked the 'Issue Operations Plugin'.

When checked the Webpage Error ( the alert icon at the left bottom corner of the page ).

Got the error message :

Webpage error details

Message: 'status-code' is null or not an object

Line: 1012

Char: 2

Code: 0

URI: https://xxxxx/batch/com.atlassian.upm.atlassian-universal-plugin-manager-plugin:plugin-manager/com.atlassian.upm.atlassian-universal-plugin-manager-plugin:plugin-manager.js

Attached the screenshots.

Please help!

THnaks,Harish

Bhushan Nagaraj
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.
October 16, 2012

Hi Harish,

The steps I gave you was for the 5.1.6 version of JIRA. Use the same concept but follow the documentation here

https://confluence.atlassian.com/display/JIRA044/Managing+JIRA's+Plugins#ManagingJIRA'sPlugins-DisablingaJIRAPlugin

Harish October 16, 2012

Hi Bhushan,

I have tried as per the documentation.

The Plugin doesnot expand when clicked. No idea why this behaviour.

The page keeps loading and gets struck.

Any issue with the webpage?

Please suggest.

have you seen the screenshots sent in earlier comment.

Thanks,Harish

Bhushan Nagaraj
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.
October 16, 2012

Harish,

Unable to access the link you have posted in the comment. I am sure it works because I have implemented it myself. Try a different browser maybe??? :-\

Harish October 16, 2012

The Error message i could see in the webpage : screenshot attached

Bhushan Nagaraj
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.
October 16, 2012

Can you try the same operation on firefox?

Bhushan Nagaraj
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.
October 16, 2012

Which version of UPM are you using?

1 vote
Adam Barylak
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.
March 7, 2013

I figured i'd share my answer to this problem here as well so that it can be used by others as needed. This solution allows you to control when the buttons are removed, as well as remove any object on the view screen based on your script. I have expanded this solution to answer another users question who only wanted to display the transition buttons and also remove tabs from the bottom, so i know it can work for whatever you want to do:

<script type='text/javascript'>
AJS.$(document).ready(function() {
        var workflowState = AJS.$('#status-val img').attr('alt');
        var issueType = AJS.$('#type-val img').attr('alt');
        var projectName = AJS.$('#heading-avatar img').attr('alt');
        if(workflowState == 'New' && issueType == 'Ticket' && projectName == 'IT Support')
        {
           var btnAssignToMe = AJS.$("#assign-to-me");
           var btnAssign = AJS.$("#assign-issue");
 
           btnAssignToMe.parent().remove();
           btnAssign.parent().remove();
      }
});
</script>

I hope this helps someone else out as much as it has helped me.

 

Özerk Dolanbay December 16, 2013

Hi Adam,

First of all, thank you for your answer but I couldn't figure out where I should put this code in jira.

Adam Barylak
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.
December 16, 2013

Yeah, you have to put it in the Announcement Banner now. I used to be able to put it in the Description of the Components field or any other field that is displayed, but now those descriptions don't even get loaded and hidden in the view screen, they only get displayed in the Edit or Transition screens. Therefore, the Announcement Banner is the only place to put scripts like this anymore.

Özerk Dolanbay December 23, 2013

In the view screen, after I selected one of the workflow transition, buttons("assign" and "assign to me") are displayed but if I refresh the page they are again hidden. Any idea?

0 votes
Lillian Shibata-Salley December 1, 2017

Hello - I'm wanting to do the same thing and please note I'm not as technical as all of you are :) I tried to put the script in the announcement banner and the whole script shows up in the banner and I can still see the Assign button. Can someone kindly direct me on what I may be missing?

 

Thanks!

Lillian

Adam Barylak
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.
December 1, 2017

It looks like Atlassian failed to decode their HTML encoding of the code blocks when they migrated from Atlassian answers to this new  "better" community thing.  Therefore a bunch of special characters were still HTML encoded in the above answers.  I tried to fix my code, but may have missed some, so let me know if you still have issues with the above.  One of the keys is that the code has to be surrounded by the <script> tags but the < and > symbols were replaced with &lt; and &gt; text, which then doesn't get recognized as HTML and will then just display the text as is.

0 votes
Hung Nguyen March 18, 2015

The solution from Adam didn't work for me on JIRA 6.3.8.

I realized that in the newer version, we have to do it differently.

I post my code here just for those who may need to do the same thing.

In the simplest form, the following will remove the Assign button and the Assign To Me link from ALL projects.

&lt;script type='text/javascript'&gt;
function contentChanged(){    
   var btnAssignToMe = AJS.$("#assign-to-me");    
   var btnAssign = AJS.$("#assign-issue");    
   btnAssignToMe.parent().remove();    
   btnAssign.parent().remove(); 
}
AJS.toInit(contentChanged);
JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED,contentChanged);

AJS.$(document).ready(function() {            
     contentChanged(); 
});
&lt;/script&gt;

If we want the actions to be more specific to certain project, we should need to check for that within contentChange() funtion

Thanks to Adam for the code of contentChange() !

Jari Kokkonen May 6, 2019

Applying the code to the Announcement banner in Jira 7.13 does not unfortunately only remove the "Assign" and "Assign to me" buttons/links, but the "More" button too.

Any ideas how to prevent this?

BR,
Jari

Adam Barylak
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.
May 6, 2019

I wouldn't suggest using any code you don't understand.  Each version of Jira is different and may require alterations to the code to behave as desired.  The above solutions are all version specific, and if you have a different Jira version, you must alter the code to suit the needs of that Jira version.

0 votes
Vevin Kumar October 28, 2014

Thanks a lot for your javascript, Adam. Helped me out. 

0 votes
Özerk Dolanbay December 30, 2013

Hi Adam,

Thank you for your help, now it is ok. Good work thanks again.

0 votes
Özerk Dolanbay December 16, 2013

Ok I figured it out. I put the code in Announcement Banner

https://confluence.atlassian.com/display/JIRA/Configuring+an+Announcement+Banner

Suggest an answer

Log in or Sign up to answer