Jira Issue Tab Panel Tutorial
Start by installing the Atlassian SDK if you do not already have it installed.
Create the plugin by running the following command.
atlas-create-jira-plugin tabpabel groupId: com.stygian.jira.plugins artifactId: tabpanel version: 1.0.0 package: com.stygian.jira.plugins.panels
A new folder called tabpanel will be created. Within the tabpanel directory, run the following command.
atlas-create-jira-plugin-module Select option 8 for Issue tab panel Classname: DemoIssueTabPanel Package: com.stygian.jira.plugins.panels Show advanced setup: N Add another module: N
Delete the files that we will not be using/
src/main/java/com/stygian/jira/plugins/panels/MyPluginComponent src/main/java/com/stygian/jira/plugins/panels/MyPluginComponentImpl test/resources/atlassian-plugin.xml
Delete and unit and integration test cases you won't be using.
Delete the following lines from atlassian-plugin.xml
<component key="myPluginComponent" class="com.stygian.jira.plugins.panels.MyPluginComponentImpl" public="true"> <interface>com.stygian.jira.plugins.panels.MyPluginComponent</interface> </component>
Edit your DemoIssueTabPanel.java file and add the line to your import statements
You can generate the HTML you would like to display in the tab panel in DemoIssueTabPanel.java. For this tutorial, we will just display a simple message.
Replace the code within your getActions method with the code below.
StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("<h1>Issue tab panel content</h1>"); stringBuilder.append("You can generate your html content here to display."); return Collections.singletonList(new GenericMessageAction(stringBuilder.toString()));
Run the plugin using atlas-debug or atlas-run to test your plugin. Below is the screen shot you should be seeing in the Issue Tab Panel.