Reputation: 717
I am working on a Python bot to sync a bunch of stuff for me from my JIRA instance on a regular basis. I don't want to be continuously polling a list of known JIRA keys looking for changes.
Ideally I would want the bot to add itself as a watcher to these JIRA issues and then occasionally poll the bot account's notification queue to see if there's anything new to sync. I did see the API docs on adding watchers. That seems trivial. However, I couldn't find anything about how to request the list of notifications from those watched issues without having to have JIRA email you the notification and then polling an email mailbox instead. Is there a way to just make a call from the Python API asking for a list of notifications?
Note: Using webhooks for this is not possible for me due to the instance's configuration restrictions.
Upvotes: 2
Views: 465
Reputation: 4228
As an alternative maybe you could retrieve the issues using a JQL. For example this JQL retrieve all issues updated in the last two days where I am a watcher.
updatedDate >= -2d and key in watchedIssues()
You can modify the updatedDate value to retrieve only the issues that have changed after your last sync.
Upvotes: 1