makeplane / makeplane/plane

[bug]: Creating or patching a work issue from API does not use requested "completed_at" field

Open
#9,011 1 comment 0 reactions 2 assignees View on GitHub

@vihar is already working on this.

Since May 4, 2026.

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

Description

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

Experiencing:
When creating or updating a work item via the API, the completed_at field is documented as optional. However, if you provide completed_at when creating an item that is already in a "Done" state, the value is ignored and the current date/time is used instead. It seems that completed_at can be set for items that are not yet completed, and the value will persist—but those items will not appear as completed in the UI. If the item's state is later changed to "Done," the completed_at date is overwritten. So it seems there is no real way to give a work item a specific completed date.

Expected Behavior:
The API should respect the completed_at value provided, regardless of the work item's state. Technically, completed_at could only be allowed to be specified only if the state group is Completed but that isn't as important.

Steps to reproduce
  1. Send a request to create a new issue with a completed state of done and set dates. project_id is valid, and state is the valid id for the 'Done' state for that project.

    Route:
    POST /api/v1/workspaces/pfp/projects/{project_id}/work-items/

    Body:

    {
        "name": "Test Work Item",
        "description_html": "<p>Test description</p>",
       "start_date": "2026-01-02",
        "completed_at": "2026-01-03T00:00:00+00:00",
        "target_date": "2026-01-04",
        "state": "3dd0f6a1-ead7-44ee-af95-1197eb501225"
    }
    

    Response: 201 Created

    {
        "id": "7145a954-1280-4dd0-a7ac-09194b14c476",
        "created_at": "2026-05-04T11:57:37.184366-04:00",
        "updated_at": "2026-05-04T11:57:37.184403-04:00",
        "deleted_at": null,
        "name": "Test Work Item",
        "description_html": "<p>Test description</p>",
        "start_date": "2026-01-02",
        "target_date": "2026-01-04",
        "completed_at": "2026-05-04T11:57:37.153978-04:00",
        "state": "3dd0f6a1-ead7-44ee-af95-1197eb501225"
    }
    

    Note that completed_at is just the current date.

  2. Try to patch same work item with correct date.

    Route:
    PATCH /api/v1/workspaces/pfp/projects/{project_id}/work-items/7145a954-1280-4dd0-a7ac-09194b14c476/

    Body:

    {
        "completed_at": "2026-01-03T00:00:00+00:00"
    }
    

    Response: 200 OK

    {
        "id": "7145a954-1280-4dd0-a7ac-09194b14c476",
        "created_at": "2026-05-04T11:57:37.228653-04:00",
        "updated_at": "2026-05-04T12:14:24.915905-04:00",
        "deleted_at": null,
        "name": "Test Work Item",
        "description_html": "<p>Test description</p>",
        "start_date": "2026-01-02",
        "target_date": "2026-01-04",
        "completed_at": "2026-05-04T12:14:24.907542-04:00",
        "state": "3dd0f6a1-ead7-44ee-af95-1197eb501225",
    }
    

    Note that completed_at has been updated to the current date.

Environment

Production

Browser

None

Variant

Self-hosted

Version

v1.3.0

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.