In the previous tutorial, we created a web-item to provide a link to Atlassian Answers site for users logged into JIRA. What if we have multiple links, that we want displayed under different sections. For example, we want to provide a "Help" dropdown, with two sections. Internal and External. Internal section will have a link that redirects to our company help website, while the external displays the Atlassian Answers link we created earlier.

Take a look at the screenshot below. You will see that we have a total of 3 web-items and 2 web-sections.

  1. Let us start be creating a plugin skeleton with the following information.

    groupId: com.jiradev.jira.plugins

    artifactId: jiradev-web-section

    version: 1.0

  2. Open the project in your IDE and open up the atlassian-plugin.xml file. We will clean up the file keeping only the i18N properties file.

  3. In this tutorial, we will add 3 web-item and 2 web-section modules at once. Run the atlas-create-jira-plugin-module command and enter the following info.

    First add the main Help web-item

    Select 25 for the web-item option

    Plugin module name: Jiradev Help Menu

    Enter section: system.top.navigation.bar

    Enter link url: default.jspa (we will not be using this)

    Show advanced setup: N

    Add another plugin module: Y

    Add the Internal Help web section

    Select 30 for web-section

    Plugin module name: Internal Help Web Section

    Enter location: jiradev-helpmenu-link (This will be the key of the main Help web-item appended by -link)

    Show advanced setup: N

    Add another plugin module: Y

    Add the Company Help web-item

    Select 25 for Web-item

    Plugin module name: Company Help Link

    Enter section: jiradev-helpmenu-link/internal-help-web-section (this is the link id of the main Help web-item/key of the internal help web section)

    Enter link url: http://www.jiradev.com/aboutme.html

    Show advanced setup: N

    Add another plugin module: Y

    Add the External Help web section

    Select 30 for web-section

    Plugin module name: External Help Web Section

    Enter location: jiradev-helpmenu-link (This will be the key of the main Help web-item appended by -link)

    Show advanced setup: N

    Add another plugin module: Y

    Add the Atlassian Answers web-item

    Select 25 for Web-item

    Plugin module name: Atlassian Answers Link

    Enter section: jiradev-helpmenu-link/external-help-web-section (this is the link id of the main Help web-item/key of the external help web section)

    Enter link url: https://answers.atlassian.com/

    Show advanced setup: N

    Add another plugin module: N

  4. Have a look at the atlassian-plugin.xml file. You will see that the SDK has added 5 new modules.
  5. Run the plugin using the atlas-run command.


Share


Show your support by tweeting about this tutorial. Is Jiradev something you would reommend? Let me know.

Contribute


Do you have a Jira plugin tutorial that can be used on this site? Please do share it with me and I can add it along with the ones available.

Contribute

Feedback


Your feedback can help improve the content on this site. If you have anything that you would like me to change/implement on the site.