You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[bug]: Comment external_id is deduplicated per project instead of per work item #10195
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:
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.
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.
I reproduced this on preview (618d0eb).
The update path (PATCH .../comments/{id}/) has the same problem, and the 409 on create can return a comment from another work item.
Attachments already scope this check by issue_id, so I've done the same for comments, with contract tests.
Activity
MishraTanishq619 commentedon Nov 6, 2026
I am exploring this issue.
MishraTanishq619 commentedon Nov 6, 2026
I reproduced this on
preview(618d0eb).The update path (
PATCH .../comments/{id}/) has the same problem, and the 409 on create can return a comment from another work item.Attachments already scope this check by
issue_id, so I've done the same for comments, with contract tests.Opening a PR shortly.