Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Hide some workflow buttons permanently from users using jquery or JS

Hi All,

I need to keep certain workflow buttons hidden from all users permanently as these buttons(transitions) will be called by an external system using JIRA REST API.

I am having really hard time to find out a concrete way of doing this. I tried to use hide transition from user workflow condition but the condition always fails.

So in the end I had to try Jquery in Announcement banner: 

It helped me to hide the buttons for initial page load but whenever there is a transition happening on ticket the hidden buttons show again. I am using below code. I am no expert in Javascript or Jquery so maybe i am missing something silly. I have the exact action ids which should be hidden always.

<script type="text/javascript">

(function($) {
$(document).ready(function() {



//more such action ids which should be hidden



I tried to use some more additional conditions below this code like when transition is 'assign in jira' then reload the page so that the ready function is executed and buttons hide again but there may be some better way of doing it.


if($("#issue-workflow-transition-submit").html()=="Assign In JIRA")

 if someone has any insights or suggestions please help!





2 answers

1 accepted

With a little more effort and help from a jquery expert i was able to get it working. 

Working code:


<script type="text/javascript">
(function($) {

$(document).ready(function() {

setInterval(function() {






Andy Heinzer Atlassian Team Feb 19, 2019

Thanks for updating the thread with your solution.   Would you mind sharing the details of your javascript?

Hi @Bhupesh Nagda 


Can you able to provide screenshot the script that you paste in Jira announcement banner. I tried to copy your scrip and replace the project name and action but didn't works. 


Appreciate your help on this

0 votes
Andy Heinzer Atlassian Team Feb 15, 2019

There are times when I've recommended using a javascript hack in Jira to hide elements on the page.  However in your case, I don't think this is really the best approach given what you told us so far.  I understand most of your users only use Jira via the webpage, but technically they are not restricted from making REST API calls themselves.  So a Javascript approach isn't really full proof solution here.

I think instead the better solution to prevent users from doing this would be to utilizing workflow conditions.  These are built into Jira workflows.   In your case, I would recommend creating a group in Jira's user management, specifically to be used by your REST API user(s).   Once you assign the Jira user(s) to that group that should be able to make these transition, you can then edit the workflow in use by that project, edit that transition and set a condition of "User in group", and select that group name.

Once you publish this workflow, then the only way a user could see that transition in Jira would be if they were a member of that specific group.


You mentioned that you tried this previously but that the condition is always failing.  Can you tell us more about what condition you selected, and how you configured it here?

Hi Andrew,


Thank you for your reply!

Background: JIRA<==>Remedy ticket syncing integration

I considered the option to use workflow conditions and using groups. However, we cannot restrict based on user group because typically any user can create ticket from remedy and then to JIRA via scripted APIs so we have to keep it open to all users.




Hello there,

I just want to hide the edit button for Closed status issues. Is this possible with putting javascript in announcement banner ? If yes, please assist me on code.




Andy Heinzer Atlassian Team Dec 10, 2019

@badana_teja For that use case, you don't need to use javascript to do this.  This is something you can do as a workflow property.  Check out the KB Issues are Editable In Closed State 

By adding that property to the workflow and then publishing the workflow, issues in that state that use that workflow will not be able to be edited when in a closed state.

Hi Andy Heinzer,

I understood your suggestion, but we would likely to allow worklog enterings after setting this property on close transition. I see, there is no option to disable edit and allow worklogs, so the only workaround I could think of is to add some Javascript code to the Jira announcement banner, since any code added to it will be executed on any Jira page. What we could do is write some code that will hide the Edit button based on the current status of the issue and allows the worklog entering as well.




Hi Andy,

I was trying to make a transition which is hidden from the user using Rest API call, how can I do that.
Your suggest of adding user to group seem less effective as my Rest API user and logged-in user will always be same.

I am trying to differentiated whether the event reached my plugin was triggerd by UI or API

Suggest an answer

Log in or Sign up to answer

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you