How to hide Workflow buttons

Hi All,

I have two questions:

1. I wanted to hide Workflow button which containts list of transitions from issue detail page.

2. Is it possible not to show Global transitions button in issue detail page, if yes how this can be achieved.

4 answers

By default, JIRA will enumerate and display all available transitions for which the current user has got permissions to execute.

You can create a Condition, whose purpose is to check the current state of the issue and to either allow or deny some transitions to be performed by the user from that state. That means it can hide/disable certain transitions from the list of available transitions on the issue screen, which will require you to write a JIRA plugin, to implement the logic that decides, for each transition, if it should be available to a user or not.

One more possibility (not recommended) is to just use either css or javascript to visually hide the "Workflow" button (which contains the list of transitions) from the the page, but you have to realize that user still can execute those transitions if he constructs the proper URL, so you shouldn't rely on it, but consider it just a quick and dirty workaround until you solve that issue properly.

Using javascript:

document.getElementById('opsbar-transitions_more').style.display = 'none'

Using css:

#opsbar-transitions_more { display: none }

Thanks for your reply, in which JS / CSS file this code should go.

Open the page in your browser, right click it and choose "View Source". Then take a look at the children of the HEAD element, and find LINK elements, which specify which css files to include. Choose one of them, which you find the most convenient (copy the css file filename and search for it in your jira web dir to find the actual file).

Hi Mladen,

When i looked at the source i am seeing javascript files with path :

<script type="text/javascript" src="/jira/s/d41d8cd98f00b204e9800998ecf8427e/en_US-90cskh-1988229788/6134/3/6.1-m4/_/download/resources/com.atlassian.jira.jira-issue-nav-plugin:viewissue/viewissue/IssueBodyView.js" >

There is no such file called IssueBodyView.js,i searched on entire computer, it seems they are getting generated on-fly.

There are a lot of js files in the head section, try searching for some of those. I can't tell you exactly which one, because you didn't mention your JIRA version. If you provide us with your JIRA version, I'll take a look and let you know which files you can use to insert your code.

Hi Varun, when an user doesn't have permission to make a transition, the button does not appear in the issue view screen. Is that what you are looking for?

Hi Ramiro,

I wanted to acheive this functinality for all workflows and users, not based on permissions / per transition.

As per above explanation, once i have a workflow lets say with 3 tranisitions and 1 global transistion, i do not want to show gloabl transition at all in issue detail page and also wanted to hide Workflow Transition button.

Hi you can use speakeasy plugin with an very easy JS code to hide the buttons.

btw. isn't it the easiest way just to remove the global transitions from the workflow?

i wanted to use of global transitions, but i do not wanted to show them in the workflow

try with this script

&lt;script type="text/javascript"&gt;  
JIRA.ViewIssueTabs.onTabReady(function() {
		hideTab();    
});
function hideTab(){
//if you wnat to hide single transition then use this and here you need to change action id as per your instance
AJS.$("#action_id_41").hide();

//if you want to hide all transiitons under workflow more options then use this
AJS.$("#opsbar-transitions_more").hide();

}
&lt;/script&gt;

add this script in footer.jsp or load it as webresource module in plugin

Thanks for your reply.

I have a workflow with the very first transition of T1, in this case i wanted to show Workflow button because it has only one transition, once i click on T1 issue moved to next status and it has T2,T3,T4 tranistions, in this case i wanted to hide Workflow button because i have more than 1 Transition.

If i place above code in footer.jsp, it will work only when page loads but this code will not be invoked as and when i am moving in different transitions.

AJS.$("#action_id_41").hide();
AJS.$("#action_id_41").parent().hide();

I tried both the statements to hide the transition but I can still see the transtion. Can you figure out what could be the problem.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,203 views 13 19
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot