Hi Igor,
This is now possible. Here are instructions from bbaker@atlassian.com:
Adding a tab to GH is done via WebPanels.
https://developer.atlassian.com/display/JIRADEV/Web+Panel+Plugin+Module
The following examples come from our test client plugin that we use in GH testing.
First in atlassian-plugin.xml add your web panel into the well know section - atl.gh.issue.details.tab
<web-panel key="greenhopper-reference-third-party-tab-1" location="atl.gh.issue.details.tab" weight="99">
<resource name="view" type="velocity" location="templates/reference-gh-issue-details-panel-1.vm" />
<context-provider class="com.atlassian.greenhopper.client.web.contextprovider.ReferencePluginContextProvider">
<param name="itemCount" value="4"/>
</context-provider>
<label key="gh.issue.panel.reference" />
<tooltip key="gh.issue.panel.reference.tooltip" />
<resource type="download" name="icon.png" location="includes/images/gun.png" />
</web-panel>
The HTML that is delivered in the web panel becomes the contents of the tab panel.
The icon image itself should be in about 14x14 to look any good.
In order to provide a "number" on the tab indicator itself you need to provide a ContextProvider that sets a well known variable - atl.gh.issue.details.tab.count
public class ReferencePluginContextProvider implements ContextProvider
{
private Long itemCount = 4L;
public Map<String, Object> getContextMap(Map context)
{
return MapBuilder.<String, Object>newBuilder()
.add("atl.gh.issue.details.tab.count", itemCount).toMap();
}
}
The context map is how you can populate variables (context) to the Velocity template.
GH will raise JavaScript a "GH.DetailView.updated" event when the details on the board change. This allows you to update the contents of the tab as the selected issue changes.
The plugin can cause GH to reload the board if you have made changes that should be reflected on the board. You should trigger a "GH.RapidBoard.causeBoardReload" event
Here is some sample code of bi directional JS that attaches handlers when the board details changes and can then cause it to be refreshed when a button is pressed
AJS.$(function () {
var installButtonHandlers = function() {
AJS.$('button.pulpfiction').bind('click', function () {
JIRA.trigger('GH.RapidBoard.causeBoardReload');
});
};
JIRA.bind('GH.DetailView.updated', installButtonHandlers)
});
I have attached the source for our test plugin to see all this in action.
Hi,
It seems that giving "atl.gh.issue.details.tab" as web panel location does not work for jira software (JIRA 7). My plugin "Issue Reminders" was working fine, now my customers are reporting reminders are not shown on issue detail pane. I have tried myself and "reminders panel" really not shown in issue detail page of boards.
I have also check which location it is with "Web Fragment Finder" plugin but it can't find required location.