I've written a custom listener which executes a SQL query to a separate database and populates several fields with the results. It works exactly as I would like and I have it triggered with an "All Issue Events" event.
This works fine if the user makes any updates to the issue. When an update occurs the fields are populated from the SQL database.
But is there an event to cause the same action when the issue is viewed? Or queried? The SQL database is sometimes updated while the user is viewing the issue and they don't see the latest results unless they make an edit to the issue.
Welcome to the Atlassian Community!
In theory, yes, you could pick up a view event with a listener.
But there are none. It would vastly overload the server.
Tthink of the issue navigator returning a thousand issues, or a board with three-hundred - the load of creating 1,000 events on every run of a filter, or, potentially worse on a board, as they run multiple filters, let alone the work that would then have to be done by the listeners picking up the torrent of events.
Thanks for the reply... I guess I was hoping that viewing would trigger the listener since I only have this listener attached to a specific project and then only stories or sub-tasks. But I do understand that still might overload things.
Alternately could I do some sort of batch update? Is it possible to update all issues in a project (again only stories or subtasks) once a day - or several times a day? My problem right now is that because the SQL database gets updated asynchronously I might miss populating something in the issue.
Yes, you can use "bulk edit" whenever you need to.
But I'm a bit stuck on why you'd want to do this. Your listener is posting data into a database, but why do you want to do this on view? The issues have not changed, so your database is not going to get new data.