Run html macro when JIRA filter is fully loaded

Henry
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 18, 2024

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

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events