Hello,
In my Confluence page, I have included a JIRA Filter macro that will filter about 100 issues and then a HTML Macro.
I am trying to add some javascript in my htlm macro that I would like to run only after the JIRA filter is fully loaded.
After some research I found that I should probably use JIRA events.
I have added the following
JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function(e, context, reason) {
if (reason == JIRA.CONTENT_ADDED_REASON.pageLoad) {
console.log("Page Load");
//My code ///
}
});I get error Uncaught TypeError: JIRA.Events is undefined
I have added the all.js library as follow but still get error
<script src="https://connect-cdn.atl-paas.net/all.js"
type="text/javascript"></script> <script type="text/javascript">
JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function(e, context, reason) { if (reason == JIRA.CONTENT_ADDED_REASON.pageLoad) { console.log("Page Load"); //My code /// } });
</script>
Could you please tell me what's wrong and/or how to achieve to run my code only when jira filter is completed.
thanks
Hi @Henry ,
if you are on a cloud instance you can't add a javascript. If you are on a DataCenter version you are trying to use a JIRA event on confluence side and it is not correct.
Hope this helps,
Fabio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.