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

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

This widget could not be displayed.

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.

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

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>

Hi,

It doesn't work in IE8, any idea?

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

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?

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.

This widget could not be displayed.

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"

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

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

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

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??? :-\

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

Can you try the same operation on firefox?

Which version of UPM are you using?

This widget could not be displayed.

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.

 

Hi Adam,

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

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.

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?

This widget could not be displayed.

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

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

This widget could not be displayed.

Hi Adam,

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

This widget could not be displayed.

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

This widget could not be displayed.

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() !

This widget could not be displayed.

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

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.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

97 views 1 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you