[bug]: issue webhook never fires on state/assignee/label/module changes (model_activity key mismatch)
Los mantenedores suelen responder en 1 día
@Yuvraj7Yadav ya está trabajando en esto.
Desde el 18/11/2026.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- django, python
- Área
- backend, backend-api-design
Línea de trabajo
Start with model_activity() in plane/bgtasks/webhook_task.py and trace how PATCH data from plane/app/views/issue/base.py is compared with the serialized issue. Check the open linked pull request (#10346) for work already underway. Done means issue updates for state, assignees, labels, and modules enqueue webhook deliveries while preserving the API-side field names.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Is there an existing issue for this?
- I have searched the existing issues
Current behavior
The issue webhook never fires for a state change (nor for assignee, label or module changes) on self-hosted Community Edition.
Reproduced on a self-hosted instance (v1.4.3, PLANE_COMMUNITY, MinIO storage, Docker Compose). The webhook is registered with issue = true, is active, and workitem.created events do arrive. Moving a work item from Todo to In Progress produces no delivery at all — webhook_logs stays empty and the endpoint is never called.
The cause is in plane/bgtasks/webhook_task.py, model_activity() (line 479):
for key in requested_data:
# Check if key is present in current instance or not
if key in current_instance: # ← line 503
current_value = current_instance.get(key, None)
requested_value = requested_data.get(key, None)
if current_value != requested_value:
webhook_activity.delay(... )
requested_data is request.data (the PATCH body, see plane/app/views/issue/base.py:476 and :701). The API accepts the relation name for related objects — state, assignees, labels, modules — while current_instance is the serialized issue, which carries the foreign-key/relation field names state_id, assignee_ids, label_ids, module_ids.
The key therefore never matches, webhook_activity is never queued, and no delivery happens.
Checked against the fields an issue PATCH is commonly sent with:
request.data key |
present in current_instance? |
webhook on update |
|---|---|---|
state |
no (it is state_id) |
never |
assignees |
no (it is assignee_ids) |
never |
labels |
no (it is label_ids) |
never |
modules |
no (it is module_ids) |
never |
name |
yes | works |
priority |
yes | works |
start_date / target_date |
yes | works |
So a webhook subscribed to work item updates only ever receives title/priority/date changes. Any integration that reacts to status, assignment or labels is silently non-functional — which is exactly what these webhooks exist for.
Note: verb="created" is unaffected, because the current_instance is None branch returns before the loop. That is why "webhooks work" can look true while the update path is dead.
Steps to reproduce
- Self-hosted Plane with an active webhook on
issueevents pointing at any HTTP endpoint you can inspect. - Create a work item (this fires a
createdevent — confirms the webhook is wired correctly). - Change its state (e.g. Todo → In Progress).
- Observe: no request arrives at the endpoint, and
webhook_logsgets no row for that change.
Reproduce the core in plain Python, no Plane needed:
requested_data = {"state": "8d7f779a-b0d2-4e9d-8876-e5f9342b4260"} # PATCH body
current_instance = {"id": "...", "name": "...", "state_id": "..."} # serialized issue
matches = [k for k in requested_data if k in current_instance]
print(matches) # [] → webhook_activity is never called
Suggested fix
Map the request-side relation names onto the instance-side field names before the lookup:
_request_key_aliases = {
"state": "state_id",
"assignees": "assignee_ids",
"labels": "label_ids",
"modules": "module_ids",
}
for key in requested_data:
instance_key = _request_key_aliases.get(key, key)
if instance_key in current_instance:
current_value = current_instance.get(instance_key, None)
requested_value = requested_data.get(key, None)
if current_value != requested_value:
webhook_activity.delay(
event=model_name,
verb="updated",
field=key, # keep the API-side name in the payload
old_value=current_value,
new_value=requested_value,
...
)
This fixes all four relations with one change and leaves the webhook payload's field value as the API name (unchanged for existing consumers). Note that state itself is an interesting case: the current value must be compared as an id (state_id), which the alias does naturally.
I have this patch running on a self-hosted v1.4.3 instance (local overlay image); state-change deliveries start arriving as soon as it is in place. Happy to open a PR with the patch and a regression test if that is useful — I did not want to open one before confirming the behaviour is not intentional.
Environment
Production
Browser
Other — reproduced with the REST API and with the web UI, and verified against webhook_logs in the database.
Variant
Self-hosted (Community Edition, Docker Compose)
Version
v1.4.3
- Lenguaje dominante
- TypeScript
- Estrellas
- 63k
- Forks
- 6.5k
- Merge medio
- 2 d 16 h
- PR fusionados (30 d)
- 70
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de makeplane/plane
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
[bug]: Comment external_id is deduplicated per project instead of per work itemPosiblemente ocupada @MishraTanishq619 la tomó hace 21 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
makeplane/plane#10195 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Missing optional chaining on actor_details and reaction_items in apps/space reactions and votesPosiblemente ocupada @ghazy2001 la tomó hace 29 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
makeplane/plane#10111 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
makeplane/plane#10082 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de makeplane/plane
Issues similares
-
good first issue help wanted
Dificultad 2/5 Menos de una hora Aptitud para principiantes 86/100
Intelligenza-Umana/intelligenza-umana-web#16 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
open-webui/open-webui#35184 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
danielmiessler/LifeOS#3001 ·
Los mantenedores suelen responder en 5 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día