Filter Jira Subscriptions using JQL

The current version of the Mattermost Jira plugin doesn’t allow subscribing a channel to updates using a generic JQL statement. In a previous version of the plugin you could specify webhooks to update a channel using a specific JQL statement. Is that still possible?

1 Like

Hi Paul,

Yes, there are two ways to subscribe to events, and the original one still works. Here are docs for Jira plugin v2.1 that describe how to set the legacy webhooks up

The reason why we made the new subscription system, is because Jira admins were expressing a pain point about having to edit the webhooks themselves in the Jira Admin Console. In order to let Jira users create subscriptions, we needed to make one webhook connect to the plugin, and allow the users to create subscriptions inside of Mattermost.

The problem is that the webhook will receive all events from Jira. You can filter the webhook with JQL on Jira’s side, but the JQL will apply to all subscriptions. The reason why we cannot use JQL inside of the subscription, is that when we receive a webhook event, we would need to call Jira’s API with each JQL statement stored in each subscription, which is very non-performant. Instead, we do not communicate with Jira’s API at all during the subscription webhook event calls.