Remove "Assign to Me" under the assignee on view screen

Steven Mustari
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.
January 28, 2020

Case:

Controlling assignment via workflow for certain workflows.

I am familiar with the JS banner hack to remove this function and we used it for years, but have since started heavily investing in behaviours and it was causing issues so I've removed the banner script.

Script fragments doesn't seem to have the option to remove this.
I've disabled the assign-to-me module and it's still present.

We are on Server 8.5.

Specifically I am wanting to remove:
Screen Shot 2020-01-28 at 11.07.58 AM.png

 

Regards,
Steven

3 answers

3 accepted

1 vote
Answer accepted
Leonard Chew
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.
January 28, 2020

Hi Steven

I know you just said you are familiar with the js-injection, but maybe its worth looking into this answer I posted for someone else.

https://community.atlassian.com/t5/Jira-questions/How-to-disable-Assign-to-me-functionality-for-a-few-specific/qaq-p/1240842

The solution uses a scriptrunner web panel and css-injection via js to hide the link.
As there are conditions and locations you can set in web panels (to narrow down when and where it is executed), it might be interesting for you.

Steven Mustari
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.
January 30, 2020

This seems to have solved the issue thank you for the resource.

Like Leonard Chew likes this
0 votes
Answer accepted
Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 28, 2020

HI @Steven Mustari 

If your announcement banner javascript is interfering with Behaviors, I'd fix the interference before throwing the baby out with the bathwater. Maybe you had other too complex scripts that were interfering. 

In this article (linked from the issue linked by @Thomas Deiler), the css should be fairly limited in scope. I can't imagine how that would interfere with behaviors.

If you are against putting content like that in the banner script specifically, you could use scriptrunner fragment to "Install a web resource". For this, you would still write either javascript or css and store it in a file and point to that file from the fragment. This code/file will now be present in every page (based on the selected context), just like the banner.

Of course, the other option is to control this via your permission scheme. Remove that permission from most users and only change the assignee via the workflow. I don't recall off the top of my head if using built-in post functions respect the permission and would fail the transition.. but if it does, then use a scripted post function and impersonate an admin account for the duration of that function. 
Now... that' getting pretty complex... but if you need to have some people able to manually assign some of the time, you would need to start managing the assignee in a custom field and copy the value to the assignee field using transitions.

All told... I think the css/javascript option is better, just keep it very narrow and specific. You could even make it conditional if you need to by using a custom web-panel that conditionally output a meta tag like <mata name="hide-assign-me" content="true"/> and have your javascript look for that value when deciding to act or not.

0 votes
Answer accepted
Thomas Deiler
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 28, 2020

Dear @Steven Mustari ,

there is a work-a-round described in the referring suggestion: https://jira.atlassian.com/browse/JRASERVER-38117

Have you tried this?

So long

Thomas

Steven Mustari
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.
January 28, 2020

@Thomas Deiler,

Thank you for the response. The Announcement banner hack I used before but it seems severely interfere with Behaviours, which at this point is required for our use cases.

The issue operations workaround is nice, but is global and disables more than just the "Assign to me" link. I do not want a global change to that degree. I am willing to remove "Assign to me" as pictured from the entire instance however I cannot disable the assign button globally. There are some projects that are less workflow driven and desire this functionality.

Our workflows in some cases actually validate issue ownership by team, and have many permission-based functions on them which in turn causes this "feature" causes an issue to become "stuck" on a workflow. I can always go in and get things back on track but just removing this entirely is our preferred solution.

Regards,
Steven

Suggest an answer

Log in or Sign up to answer