Hello. I’m quite new to developing plugins, so please bear with my ignorance.
I was searching for a while to find a way of scheduling a job in my plugin that runs in regular intervals. I have found that you can use the PluginScheduler class from Java API to do that.
What I can’t figure out is how to access JIRA content from the scheduled job ? Say I wanted the job to pull all the comments associated with specific project and do some processing on them. How do I do that ? I’ve gotten the job to run like I wanted, but it’s useless if I can’t actually get it to do anything. I tried to pass JiraAuthenticationContext with Spring’s autowiring to a class implementing LifecycleAware interface, but when I call getLoggedInUser() it returns null.
How do I get the job to do some actual work, like pulling comments, updating issues etc. ? Or am I terribly mistaken about my approach and it should be done differently, or not at all ?