I render a web-panel on the Jira issue view (location: atl.jira.view.issue.right.context). The velocity template looks as roughly follows:
<!-- some HTML here -->
<script type="text/javascript">
// some javascript here
</script>
On the normal issue view (/browse/ISSUE-KEY
) this works just fine, the HTML loads and the JS tag gets executed.
However, if the same panel gets loaded on the browse Jira project view, the HTML loads as expected but the JS tag seems to get magically removed from the velocity template.
Does anyone have an explanation for this? This inconsistency is driving me mad. I tried a bunch of variants to make this work with no success. E.g. to put the JS code in a separate JS file, create a web-resource
for it in atlassian-plugin.xml
, and load it via $webResourceManager.requireResourcesForContext("context-key")