One easy tip to avoid nuking production in Atlassian Jira and Confluence

by | Jul 11, 2018

In our previous post we discuss some automated steps you can take to help get your staging environment set up correctly. But once you’re there, new risks come up. In this blog, we focus on what you can do in both your production and staging environments to ensure your admins are less likely to confuse the two and break something.

Did you ever delete a scheme and then freak out when you realize you did it on the wrong system? When you’re heads down trying to get things done, it’s easy to lose track of which system you are on.

We’re no different, and have been guilty of this in the past. To help reduce the risk of this kind of mistake we came up with a simple visual cue to help.

A light red tint* is applied to all pages when viewed by an admin user, reminding them that they are on a production instance. When they switch to staging, we do the same with a light green* tint. Keep in mind that while this article talks about Jira, the same code can be adopted (with a bit of tweaking) to Confluence or any other Atlassian tool that allows you to inject your own code. How did we accomplish this? With a little bit of JS and CSS in each systems announcement banner:

<!-- Update the background color and transparency as you need.
Green: (0,100,0, .12)
Red: (100,0,0, .12)

  pointer-events: none;
  background: rgba(0,100,0, .12); 
  position:fixed !important;
  z-index: 11;

// First check the local UI element to reduce number of requests to server
  // Get user permissions
  $.get( "/rest/api/2/mypermissions", function( data ) {
    // Validate that user has either admin or sysadmin and then append the overlay
    if( data.permissions.SYSTEM_ADMIN.havePermission || data.permissions.ADMINISTER.havePermission){
      $("#page").append( "<div id='admin-overlay'></div>" );

* We understand that this does not work for individuals who are colorblind. If you have any feedback on similar techniques that work just as well for colorblind individuals please share them with us in the comments.

Subscribe to receive our monthly
blog posts in your inbox

Latest Blogs
Financial Companies and the Cloud: 5 Trends

Financial Companies and the Cloud: 5 Trends

Spurred by the pandemic, financial companies have accelerated digital transformation, including cloud computing. Among many benefits, cloud technology helps financial companies meet the evolving needs of consumers and lower infrastructure costs. In the Atlassian world...

read more
Share This