Hi everyone,
I have a strange problem and I don’t know how to fix it.
I added a web panel on the right context of the issue and a velocity view resource.
When I open the project address (i.e. …/jira/projects/TEST/issues/TEST-1) everything is fine with the page and the web panel context as expected.
But, if I open the issue directly (i.e. …/jira/browse/TEST-1) only my web panel context content is loaded on a grey background, all the rest of the issue page is missing.
I created a small example to reproduce this.
‘webpanel’-section in the atlassian-plugin.xml:
<web-panel name="issuewebpanel" i18n-name-key="issuewebpanel.name" key="issuewebpanel" location="atl.jira.view.issue.right.context" weight="1000">
<description key="issuewebpanel.description">The issuewebpanel Plugin</description>
<context-provider class="com.it.dev.webpanelexample.WebPanelContextProvider"/>
<resource name="view" type="velocity" location="/templates/view.html"/>
</web-panel>
The simple context provider class:
package com.it.dev.webpanelexample;
import com.atlassian.jira.plugin.webfragment.contextproviders.AbstractJiraContextProvider;
import com.atlassian.jira.plugin.webfragment.model.JiraHelper;
import com.atlassian.jira.user.ApplicationUser;
import java.util.TreeMap;
import java.util.Map;
public class WebPanelContextProvider extends AbstractJiraContextProvider
{
@Override
public Map getContextMap(ApplicationUser user, JiraHelper jiraHelper)
{
Map contextMap = new TreeMap();
contextMap.put("entry", "Hello World!");
return contextMap;
}
}
The view template file:
<html>
<head>
</head>
<body>
<p>Say 'hallo': $entry</p>
</body>
</html>
Now I made two screenshots to show what is happening:
(Had to put both in one picture because of forum limitations)
The following screenshot shows the difference between the project and issue page:
When opening the issue page only the webpanel content is loaded and all the rest of the jira page for this issue is missing!
Can anyone please help me?