makeplane / makeplane/plane

Work Items API returns `labels` as UUIDs in list responses but as objects in single-item responses

Open
#9,594 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
59.6k
Forks
5.8k
Avg merge
1d 22h
Merged PRs (30d)
49

Description

Fetching work items via the list endpoint returns labels as an array of bare UUID strings, while fetching a single work item returns labels as an array of full label objects. Same field, same project, different type — so a consumer that reads one endpoint's shape breaks on the other.

Expected

labels has one consistent shape across both endpoints, or the difference is documented.

Actual

GET /workspaces/{slug}/projects/{project_id}/issues/ — bare UUIDs:

{
  "id": "11111111-1111-1111-1111-111111111111",
  "labels": [
    "22222222-2222-2222-2222-222222222222",
    "33333333-3333-3333-3333-333333333333"
  ]
}

GET /workspaces/{slug}/projects/{project_id}/work-items/{id}/ — full objects:

{
  "id": "11111111-1111-1111-1111-111111111111",
  "labels": [
    {
      "id": "22222222-2222-2222-2222-222222222222",
      "name": "Bug",
      "color": "",
      "sort_order": 295535,
      "project": "44444444-4444-4444-4444-444444444444",
      "workspace": "55555555-5555-5555-5555-555555555555"
    }
  ]
}

Neither request passes expand.

This matters when merging labels rather than replacing them. PATCH expects an array of UUIDs, so code that reads the current labels off a work item to preserve them has to normalize both shapes first, or it silently sends objects back and drops every label on the item.

Details
  • Endpoints: GET .../issues/ and GET .../work-items/{id}/
  • API: REST API (api.plane.so, cloud)
  • Impact: consistent, not intermittent — the two endpoints always disagree.

Possibly related to #9534, which is the same class of problem on state (bare UUID returned despite ?expand=state).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the responses from GET /workspaces/{slug}/projects/{project_id}/issues/ and GET /workspaces/{slug}/projects/{project_id}/work-items/{id}/ without expand. Trace the API entry points that serialize labels and verify that both endpoints return the same labels shape, with regression coverage for each response.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.