Altering the Application Header

Hi,
I am very new to the world of development, but have strong technical resources to lean upon, but I am having issues locating the file on our linux server that contains the aui-header.

We need to add a navigation bar that resides on top of the Jira header, so that it aligns with the other applications we access.

I’ve played around with the example offered in the documentation and applied the html to the existing html from the Header and the appearance is exactly what we want. I just don’t know how to locate the source to make the change and load it onto the server.

Any help or “You’re an Idiot” comments are welcome.

Thank you.

I would be careful modifying the source code of Jira - you’ll end up regretting it when you upgrade the jira instance later (and have to remember what the changes you made were).

I would take a look at the atlassian marketplace to see if there are apps there that will fit your needs. If there aren’t then you can write your own app (don’t worry - it’s not that bad).

  1. Install the sdk from https://developer.atlassian.com/server/framework/atlassian-sdk/set-up-the-atlassian-plugin-sdk-and-build-a-project/

  2. Then execute: atlas-create-jira-plugin. This will walk you through the creation of a very very basic plugin.

  3. Then head into the src/main/resources folder and edit the atlassian-plugin.xml. You want it to look like:

<?xml version="1.0" encoding="UTF-8"?>

<atlassian-plugin key="${atlassian.plugin.key}" name="${project.name}" plugins-version="2">
  <plugin-info>
    <description>${project.description}</description>
    <version>${project.version}</version>
    <vendor name="${project.organization.name}" url="${project.organization.url}"/>
    <param name="plugin-icon">images/pluginIcon.png</param>
    <param name="plugin-logo">images/pluginLogo.png</param>
  </plugin-info>
  
  <web-panel name="My Web Panel" i18n-name-key="my-web-panel.name" key="my-web-panel" location="atl.header" weight="1000">
    <description key="my-web-panel.description">The My Web Panel Plugin</description>
    <resource name="view" type="velocity" location="/templates/header.vm"/>
  </web-panel>
</atlassian-plugin>

This is is creating a web-panel at the atl.header (which is right above the header location). Whenever the page is loaded, the velocity file at tempaltes/header.vm will be run.

Next up - create the templates folder at src/main/resources and then inside this folder create the header.vm (src/main/resource/templates/header.vm ).

Then from within the plugin directory - execute atlas-run. This will start a local jira instance at http://localhost:2990/jira that will let you see the contents of the app as necessary (the file that you want to modify will be in src/main/resources).

Make the changes you want (to get the changes uploaded - trigger atlas-package from another terminal window).

Once you’re happy - there will be a jarfile in the target folder that you can upload.

For more details about the sdk: https://developer.atlassian.com/server/framework/atlassian-sdk/set-up-the-atlassian-plugin-sdk-and-build-a-project/

For more details about the web panel: https://developer.atlassian.com/server/jira/platform/adding-content-to-the-jira-view-issue-page/

3 Likes

I agree with Daniel this is the right way to go about adding a link to your instance.

Thank you all for the assistance. I will try to create the plugin as explained above. Also, to provide more context, I’ve added a screenshot of the toolbar. When users access the main site, this toolbar is present for every application selected, which is the goal when they use Jira or a service desk portal.

We can easily accomplish the same in Confluence with the Custom HTML option. It just doesn’t seem to exist in Jira.

Thanks.

Good morning,
Thank you very much for the assistance with the header. We are making great progress and are almost ready to deploy the plugin.

I’d like to ask if you all could steer me in the correct direction regarding the Service Desk portal. We need to have the same header added there.

Is there a specific file we should identify, like we did with “atl.header”?