Is there a way to detect when the Activity Module of an issue finishes loading?

I'm trying to implement some Javascript customization on my JIRA instance, specifically on the issue comments section. It works fine when the page is first loaded and the Comments tab is already selected, but whenever I click on another tab and return to the original Comments tab, it's gone.

I found a workaround using a setTimeout() function, so it loads again when the time runs out, but it's not really a good option, since the time for loading comments varies between different issues. So there's my question: can I manage to execute this function by the exact time the comments finish loading?

1 answer

1 accepted

There is the event you can bind to:

JIRA.ViewIssueTabs.onTabReady(function() {
	console.log("Issue tab loaded.");

Hope this helps!

It worked on the Issue screen, but in all the other screens it returned errors. It wiped out all of the dashboard screens on the process. Is there any configuration for it to execute only on the issue screen?

PS: I was wondering if there is any documentation on JIRA Javascript events like this one. I couldn't find it anywhere before you wrote its name.

Nevermind, got it worked out. Just had to put it inside another function.

Thank you very much!

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,755 views 11 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot