Hide the Button Assign and Assign to me when a specific status is set

Andrea Tanzer April 16, 2013

Hey there!

I would like to hide the Assign and the Assign to me button without losing their functionality. Let me explain...

We have a custom field (Owner). The Owner of a ticket is the person who is in charge of resolving an issue. The assignee of an issue (if owner != assignee) is the person who should answer a question that occured during reading / analysing the issue.

We configured a workflow for that (Request Information). The workflow works like this: The user presses the Request Information button, decides on the assignee and asks the assignee a question.

The assignee should answer this question via the workflow button (Provide Information) - not with the assign button. The Workflow then copies the Owner value to the assignee value.

Anyway, if the assignee is not the correct contact person, it should be possible to pass on an request to the correct contact person. Therefore, we use: Pass On Request (also custom workflow) where the user can choose the assignee.

I read about the workflow properties: https://answers.atlassian.com/questions/44943/can-i-remove-the-assign-and-assign-to-me-options-from-tickets-in-specific-statuses but these don't work well for my use case. They only work for the 'Provide Information' usecase, but not for the pass on request. The 'Provide Information' usecase copies the owner to the assignee field, so there is no direct assignment.

When using the properties for the 'Pass On Request' the user should be able to assign the issue to another user, but only via the 'Pass On Request' button, not the Assign / Assign to Me button. When i use the property jira.permission.assign.$group the assign button is hidden, but i can also not assign via the custom workflow button :(

Hence, I would like to know if there is any possibility to only hide those button, but not remove the functionality of the assign process.

8 answers

1 accepted

3 votes
Answer accepted
DanielG
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 16, 2013

You will have to develop some custom code Javascript/Jquery.

Jira doesn't have by default the feature that you're looking for.

Sorry :(

Mizan
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 24, 2013

Add little delay in your script execution using setTimeout() .. this might solve the problem

Andrea Tanzer April 24, 2013

This does the trick. However, the assign button is still visible when the status has been changed. After a refresh of the page, the button is gone.

It is a solution, but not a very sexy one :(

Florian Patzl April 24, 2013

Unfortunately, a delay doesn't help here, since the script (in the announcement banner) is not executed again after a workflow transition. So when opening the issue it's in a status where the buttons should be displayed, and then a workflow transition is executed and the buttons should be hidden after that transition.

FYI, currently we're testing with a modified version of this script:

https://answers.atlassian.com/questions/96933/can-we-remove-the-assign-button-in-the-view-issue-page-in-jira-4-4-5?page=1#146075

Mizan
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 24, 2013

Ok , then in this case how about using setInterval() .. I dont know if this will cause any performance issue . You can refer this post of mine

Florian Patzl April 24, 2013

Thanks for the tip, that's a possibility. We'll need to test if there are any major drawbacks (since the script will be executed in small intervals, on every page of Jira..)

Özerk Dolanbay December 26, 2013

Hi Forian,

Did you have a chance to test it?

4 votes
Christian Czaia _Decadis AG_
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 16, 2013

Hey, I'd go with a property associated with the workflow step. Haven't tried it though:

jira.permission.assign=denied

Jobin has a pretty good collection of workflow properties:

http://www.j-tricks.com/1/post/2011/02/permissions-based-on-workflow-status.html

Cheers Christian

Andrea Tanzer April 18, 2013

Thanks, but as mentioned in my question this is not helping me :)

Robert Varga April 6, 2016

This is very helpful if you just need to hide built in actions based on status. Thanks.

2 votes
Mizan
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 16, 2013

As workflow properties are not helping , you can hide it using javascript/Jquery,

You will need to write a script which will check for the issue status and accordingly hide the two buttons . You will need to paste this script in the announcement banner .

1 vote
Naren
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 16, 2013

Can you give it a try by disabling the 'Assign' and 'Assign to me' button. You can disable it from here -

  • Login as JIRA Administrator
  • Go to Administration --> Plugins --> System Plugins
  • Click 'Manage Plugin Modules'
  • You can see 'View ops bar assign link' plugin module. Disable it.

Hope this is inline with what you are looking for!

Andrea Tanzer April 16, 2013

Almost. This hides the Assign or Assign to me button for every step in the status. I only need it hidden for one specific status (Waiting for Information) and when an issue has another status the Assign action is allowed.

Thank you, though

Raju Adluru
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.
August 27, 2013

I dont find that option- 'View ops bar assign link' plugin module in JIRA 6.0.2, any idea, in which module there are located?

0 votes
Paolo Bolla August 21, 2018

You can add a workflow property:

jira.permission.assign.denied = true

0 votes
Aviva Haimov December 17, 2015

No solution yet? 

I'm dealing with the same issue. 

 

Aviva

0 votes
Ramiro Pointis
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 16, 2013
Mizan
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 16, 2013

This has been mentioned in the question .

0 votes
Andrea Tanzer April 16, 2013

Ah well we are using Jira 5.1

Suggest an answer

Log in or Sign up to answer