Haut de page

5 Jira tips and tricks


Posted by
Stefanie Chernow

February 6, 2018

If you are a Jira admin, it is more than likely you have been in the situation where you’ve needed to adjust your instance to fit your team’s needs. Maybe those emoticons don’t keep the professional tone you’d like in your communications. Maybe you need a better way to track time zones across your company’s different locations. Or maybe you just want to make your life easier by not having to sign in every time you want to access an admin screen.

While Jira is a powerful tool for project management at scale, getting the most out of it means knowing a few tips and tricks to make your instance work for you. We’ve compiled a few must-know hacks that every Jira admin should know.

Jira tip 1: How to deactivate emoticons in Jira

Because “(smile) (smile) (smile) (big grin)” might not be the message you want your users to leave as a comment on your company’s Jira. Here’s how to remove them:

  1. Open [Jira_INSTALL]/WEB-INF/classes/system-renderercomponentfactories-plugin.xml
  2. Find < renderer-component-factory key=”emoticonrenderer” and remove it completely (8 lines)
  3. Reboot Jira
 Note: This does not work on the Cloud version of Jira!

Jira Tip 2: How to deactivate websudo in Jira

From Jira 4.3 and onwards, every time you need to access an administration screen you’ll need to enter your password again – which can be a bit annoying. Luckily, it is possible to deactivate this feature by adding a line in the <Jira-home>/Jira-config.properties file:

Jira.websudo.is.disabled = true

Afterward, reboot Jira so that this modification is taken into account.

Jira Tip 3: How to disable relative dates in Jira

At times, seeing relative dates like “Today,” “Yesterday” or “Just a moment ago” is not the very practical. Again, Jira is flexible so you can disable relative date formatting and simply show standard date formats.

If you’re running Jira 4.4+, here’s how to do it:

  1. Shut down Jira
  2. Navigate to $Jira_HOME
  3. Edit the file: Jira-config.properties (If this file does not exist, create it)
  4. Add the following line: Jira.lf.date.relativize = false
  5. Save the file
  6. Restart Jira

Jira Tip 4: How to call Jira REST API inside Javascript

  1. Create an Ajax query using AJS library. Here is a sample:
    AJS.$.ajax({
       url: AJS.params.baseURL+"/rest/api/2/mypermissions?projectId="+projectId,
       type: 'get',
       dataType: 'json',
       async: false,
       success: function(data) {
          hasRight = data.permissions["CREATE_ISSUE"].havePermission
       }
    });

    2. Insert this Ajax calls into your JavaScript function:

    function hasRightToCreateIssue(projectId)
        {
        var hasRight;
             AJS.$.ajax({
                url: AJS.params.baseURL+"/rest/api/2/mypermissions?projectId="+projectId,
                type: 'get',
                dataType: 'json',
                async: false,
                success: function(data) {
                    hasRight = data.permissions["CREATE_ISSUE"].havePermission
                }
             });
             return hasRight;
        }

    3. Call your function in order to display something in Jira. Here, we decided to display a “Create” button only if the user has the right to work on the specific project:

    var hasRight = hasRightToCreateIssue(10000);  
        if(hasRight){
            AJS.$('#create_link').parent().parent().append("... some HTML ...");
        }

Jira Tip 5: Show multiple time zones

If you have different teams and users around the world, you’ll want to know what time it is in their locations. In Jira’s banner, you can add different clocks:

 

 

You can accomplish this by using the following code:

 

<html>
<body style="font-family:Verdana, Geneva, sans-serif; border: none; margin:0px;padding:0px;overflow:hidden;background-color:#ededed">
 
 
 <center>
<iframe src="https://localtimes.info/timediff.php?lcid=CHXX0116&cp=000000,ededed&uc=0" seamless="" style="background:white" width="190" height="41.018868" frameborder="0"></iframe>     

<iframe src="https://localtimes.info/timediff.php?lcid=FRXX0099&cp=000000,ededed&uc=0" seamless="" style="background:white" width="190" height="41.018868" frameborder="0"></iframe>     

<iframe src="https://localtimes.info/timediff.php?lcid=UKXX0085&cp=000000,ededed&uc=0" seamless="" style="background:white" width="190" height="41.018868" frameborder="0"></iframe>     

<iframe src="https://localtimes.info/timediff.php?lcid=CAXX0301&cp=000000,ededed&uc=0" seamless="" style="background:white" width="190" height="41.018868" frameborder="0"></iframe><br>

</center>
 
  </body>
</html>

 


There you have it – in just a few minutes, you become an exponentially better Jira admin! However, if you’re looking to further improve your Jira savviness, check out Valiantys’ training courses, which are held both online and in-person around the world.