Customize Jira login page

Still need help?

The Atlassian Community is here for you.

Ask the community

The information in this page relates to customizations in Jira. Consequently, Atlassian Support cannot guarantee to provide any support for the steps described on this page as customizations are not covered under Atlassian Support Offerings. Please be aware that this material is provided for your information only and that you use it at your own risk.

Also, please be aware that customizations done by directly modifying files are not included in the upgrade process. These modifications will need to be reapplied manually on the upgraded instance.

Purpose

In some usage scenarios, you may want to include a customized message on JIRA's login gadget to include messages you'd find useful or remove certain elements. Since there's no way to modify the gadget through JIRA's interface, you'll have to manually edit its source files using the command line (Terminal/CMD).

Process

(warning) Always remember to backup the files you modify so you can rollback in case anything goes wrong in the process.

  1. For JIRA 8.x and above, you'll need to modify the gadget plugin <JIRA_INSTALL>/atlassian-jira/WEB-INF/atlassian-bundled-plugins/jira-gadgets-plugin-X.X.X.jar
  2. To make any changes to the JAR file, first you need to extract its contents.

  3. Create a temporary directory, navigate into it, then run the following command. Modify <JIRA_INSTALL> and <X.X.X> accordingly to match the current installation:

    jar xf <JIRA_INSTALL>/atlassian-jira/WEB-INF/atlassian-bundled-plugins/jira-gadgets-plugin-X.X.X.jar
  4. This command will differ depending on the Jira version and installation, for example in Jira 8.20.10 the file is named jira-gadgets-plugin-8.20.10.jar
  5. Ensure the current JAR is stored as a backup (renamed it or move it elsewhere)
  6. The file to be modified is login.soy, It is located under the extracted jar within the temporary directory structure /static/dashboarditem/login
  7. Modify the login.soy file as per your requirement, for e.g. adding a new <div> element with a label to display a message.

    <div>
          <label> This is Customized Login Gadget </label>
    </div>
    <div class="field-group">       
    	<label accesskey="u" for="login-form-username" id="usernamelabel">{getText('gadget.login.username', '<u>', '</u>')|noAutoescape}</label>
       	<input class="text medium-field" id="login-form-username" name="os_username" type="text">
    </div>
  8. Create a new JAR container after modifying the files and name it the same as the original JAR file (e.g. jira-gadgets-plugin-8.20.10.jar). Run this command from the temporary directory created on Step 3:

    jar cvfm jira-gadgets-plugin-X.X.X.jar META-INF/MANIFEST.MF ./*
  9. Move the newly created jira-gadgets-plugin-X.X.X.jar file back into <JIRA_INSTALL>/atlassian-jira/WEB-INF/atlassian-bundled-plugins/
  10. Restart JIRA and access the login page.

As a result, below is the customized login gadget:

Additional Customizations

To have a similar effect on login.jsp (when clicking "Log in" in the upper right corner or clicking "Log in again" on the logout page) it's also necessary to modify the loginpage.jsp, loginform.jsp, login.jsp files in <JIRA_INSTALL>/atlassian-jira/includes directory. For steps to edit these, please refer to the Atlassian Community.


Last modified on Jul 11, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.