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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just in case here's some info about the buttons:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try with this script
<script type="text/javascript"> 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(); } </script>
add this script in footer.jsp or load it as webresource module in plugin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi you can use speakeasy plugin with an very easy JS code to hide the buttons.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
btw. isn't it the easiest way just to remove the global transitions from the workflow?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i wanted to use of global transitions, but i do not wanted to show them in the workflow
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.