[bug]: Comment external_id is deduplicated per project instead of per work item
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 74/100
Línea de trabajo
Lee apps/api/plane/api/views/issue.py alrededor de las líneas 1565 y 1735, donde se comprueba si hay IDs externos duplicados al crear y actualizar comentarios. Sigue cómo el endpoint identifica el elemento de trabajo actual y compáralo con el filtro limitado al proyecto descrito en el issue. La tarea estará completa cuando se puedan usar la misma fuente y el mismo ID externos en distintos elementos de trabajo de un proyecto, mientras que una repetición en el mismo elemento de trabajo siga devolviendo 409; verifica ambos casos a través de la Comments API.
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
Creating a work item comment with external_source and external_id returns 409 when any work item in the same project already has a comment with that pair. The check belongs to one work item's comment endpoint, but it filters by project only:
apps/api/plane/api/views/issue.py:1565 (create) and :1735 (update), branch preview:
IssueComment.objects.filter(
project_id=project_id,
workspace__slug=slug,
external_source=...,
external_id=...,
).exists()
So one external event that touches several work items in a project, written with one key per event, can record a comment on the first work item only. The rest get 409, and the id in the response points to a comment on a different work item.
Steps to reproduce
- Take two work items A and B in one project.
- Create a comment on A:
curl -X POST "$HOST/api/v1/workspaces/$SLUG/projects/$PROJECT/work-items/$A/comments/" \
-H "X-API-Key: $KEY" -H 'Content-Type: application/json' \
-d '{"comment_html":"<p>probe</p>","external_source":"probe","external_id":"scope-1"}'
Result: 201.
- Send the same request for B.
Result: 409 with {"error":"Work item comment with the same external id and external source already exists","id":"<id of the comment on A>"}.
Expected: 201 on B. The 409 should apply only to a repeat on the same work item, by adding issue_id to the filter. If project-wide uniqueness is intended, it would help to say so in the API docs.
Environment
Production
Browser
Other
Edition
Commercial
Version
v3.3.0
- Lenguaje dominante
- TypeScript
- Estrellas
- 61.9k
- Forks
- 6.3k
- Merge medio
- 1 d 18 h
- PR fusionados (30 d)
- 75
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 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 6 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
-
[bug]: Email notifications show a broken avatar for users without a profile photoPosiblemente ocupada @gurnoorpannu la tomó hace 21 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
makeplane/plane#10009 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
🐛 Bug: Calendar work items cannot be opened on mobilePosiblemente ocupada @pennnnnnnnnn la tomó hace 23 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
Todos los issues de makeplane/plane
Issues similares
-
apps/stage-web bug env/os-linux pending triage scope/audio-output
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
reproduced
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
anomalyco/opencode#61640 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
scope: data grid status: waiting for maintainer
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
mui/mui-x#24090 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
ai-driven-fuzzing bug Minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
ai-driven-fuzzing bug claude Minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
linagora/twake-calendar-frontend#1944 ·
Los mantenedores suelen responder en 1 día