I’m developing a custom Jira plugin, and I would like my web-panel to re-retrieve the context map parameters from it’s ContextProvider class (which is my custom one) once every minute. Or, I could fire some custom event and then handle it somehow, probably through JS.
In any case, I have no idea on how to achieve this and would be extremely thankful for any suggestions.
Yes, refreshing the page reloads the params of the velocity template, but I would like this to happen independently of anything, periodically.
I have written a PluginJob to aggregate the data which is then shown on the page. It is then used in the getContextMap() to pass the data to the template. My plugin job is triggered once every minute, and according to my logs there is no problem with that. I can share the code, if there is a need.
@Taylan, thank you for your response! But, I am a little bit more than 0 in JS and have troubles with understanding of how do I include the JS resorce file to my plugin and getting it to work correctly.
Okay. Please try to follow this guide in order to have a Web resource that contains your JS file. After doing that, reference the web resource you just created in your .vm file. That should allow you to use JS in your template