I have successfully integrated a React project with Jira server by using the WRM webpack plugin. The web-panel shows with all required data in the issue view page.
But in the project issue navigator, only the webpanel heading is shown, but no data is shown. I believe the React Js part is not called.
Please let me know what I am missing here.
WebPack WRM plugin config:
new WrmPlugin({
pluginKey: "<<changed>>",
contextMap: {
"th-tests": ["jira.view.issue" , "jira.navigator.simple", "jira.navigator.advanced"]
},
xmlDescriptors: path.resolve(
ADDON_OUTPUT_DIR,
"META-INF",
"plugin-descriptors",
"wr-defs.xml"
)
}),
Velocity Template:
$webResourceManager.requireResource("gid.pid:pkey")
<div id="root" data-key=$issue.getKey()></div>
<script>
AJS.$(function() {
console.log("resource loaded"); // Shows in console
JIRA.bind(JIRA.Events.ISSUE_REFRESHED, function() {
console.log("issue refreshed"); // Shows in console
});
});
</script>