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?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nevermind, got it worked out. Just had to put it inside another function.
Thank you very much!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.