Hey @ibuchanan ,
What is the JQL query of listening for all issues of the workspace? I am talking about creating a webhook from REST API(OAtuh2) which triggers on every issue update/delete for the entire workspace(eventually for issues of all the projects)
Is it even possible using the REST API? I can see the default state of JQL query as “All Issues” when I create the webhook manually.
Hi @niraj1 ,
Welcome to the Atlassian Developer Community.
An empty JQL expression is valid in the Jira User Interface and REST API when searching for issues. For example, https://your-tenant.atlassian.net/rest/api/3/search?jql= will return all issues. For this reason, I assume an empty JQL expression is also valid when registering a webhook. From your question, you will want to register the webhook for
jira:issue_deleted events, but you may also like to register for it for
jira:issue_created events if you need to track the full lifecycle of issues.
It doesn’t. I am getting below error:
Empty JQL search not supported
Can you dig deeper a bit and if you can tell me if it is possible at all? It’s gonna definitely affect the way we are handling our integration right now.
@dmorrow What are the event ids for listening for Project Update and Project delete events.
I tried: ‘project_updated’, 'project_deleted AS WELL AS ‘jira:project_updated’, ‘jira_project_deleted’
None of them worked.
This seems really weird that I am not able to listen to the project related changes.
Hi @niraj1 ,
It’s a big ugly, but try registering the webhook with the JQL
issueKey != NONEXISTENTPROJECT-1.
Regarding your query about project events, when registering webhooks via the REST API, only a subset of event types are supported. These are identified in the documentation. If you click on the WebhookDetails link, you will see a popup that enumerates the supported events. Project events are not supported.
I am curious to know the reason behind not allowing to listen to project related changes. Here is the situation:
We are providing a two way sync between Chisel(https://chisellabs.com) and Jira. Now as the name suggests(two-way sync), we keep both the workspaces in sync using the Webhooks and Calling Jira APIs whenever something gets changes into Chisel.
Now let’s say I want to sync Chisel with one project of Jira, which means I only want to listen to issues related events for single project. BUT what If someone from Jira deletes that particular Jira Project. Now there is no way Chisel’s system knows about that Project has been deleted and it will keep trying to sync.
Now, I can understand that this is an edge case and there are couple of workarounds to handle this BUT I think if you consider the lifecycle of the webhooks then it makes sense to have a listening capability for Project related changes.