[bug]: PATCH can give a work item the same external_id and external_source as another one

Aperta
#10,389 1 commento 0 reazioni 2 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@vihar ci sta già lavorando.

Dal 24/11/2026.

  • #10395 di @ashokram-si — aperta
  • #10417 di @avesh-pathak — aperta

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

🐛bug plane
Is there an existing issue for this?
  • I have searched the existing issues
Current behavior

The public API checks for a duplicate external id on PATCH only when external_id is in the body and differs from the stored one (apps/api/plane/api/views/issue.py). Changing only external_source, or sending an external_id equal to the stored one together with a new source, skips the check, so two work items end up with the same pair. After that, looking the item up by external_id and external_source (the list filter, and the upsert in PUT) raises MultipleObjectsReturned and returns a 500. POST checks the full pair and answers with a 409.

The cycle, module and state PATCH endpoints of the public API have the same check.

Steps to reproduce
  1. Create work item A with external_id "1" and external_source "jira", and work item B with external_id "1" and external_source "github".
  2. PATCH B with {"external_source": "jira"}.
  3. The response is a 200 and both items now have ("1", "jira"); expected a 409.
Environment

Production

Browser

None

Edition

Community

Version

v1.5.0 (also on preview at 723bb178f)

Lingua principale
TypeScript
Stelle
63k
Fork
6.5k
Merge medio
2g 16h
PR unite (30g)
70

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di makeplane/plane

Tutte le issue di makeplane/plane

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.