Bulk edit API does not update done_at as documented #604

Closed
opened 2025-11-01 21:00:11 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @Plong-Wasin on GitHub (Sep 10, 2025).

Description

I am testing the bulk edit API in Vikunja, but it does not update certain fields according to the documentation.

API:
POST https://try.vikunja.io/api/v1/tasks/bulk

Payload:

{
    "task_ids": [1,2],
    "done": true,
    "done_at": "2025-09-10T09:12:11.015Z"
}

Response:

{
    "task_ids": [1,2],
    "done": true,
    "done_at": "2025-09-10T09:12:55.670214735Z",
    ...
}

However, when checking the tasks again via:
GET https://try.vikunja.io/api/v1/projects/1/views/247/tasks

The done_at field is not updated:

[
    {
        "id": 1,
        "done": true,
        "done_at": "0001-01-01T00:00:00Z",
        ...
    },
    {
        "id": 2,
        "done": true,
        "done_at": "0001-01-01T00:00:00Z",
        ...
    }
]

percent_done and other fields are not expected to change unless explicitly included in the payload, which is correct.

It seems the issue originates in bulk_task.go, where the columns being updated do not include done_at and other fields.

For reference, the full list of task columns can be found in tasks.go

Vikunja Version

v1.0.0-rc1-120-25388065

Browser and version

No response

Can you reproduce the bug on the Vikunja demo site?

Yes

Screenshots

Image Image
Originally created by @Plong-Wasin on GitHub (Sep 10, 2025). ### Description I am testing the bulk edit API in Vikunja, but it does not update certain fields according to the documentation. **API:** `POST https://try.vikunja.io/api/v1/tasks/bulk` **Payload:** ``` { "task_ids": [1,2], "done": true, "done_at": "2025-09-10T09:12:11.015Z" } ``` Response: ``` { "task_ids": [1,2], "done": true, "done_at": "2025-09-10T09:12:55.670214735Z", ... } ``` However, when checking the tasks again via: `GET https://try.vikunja.io/api/v1/projects/1/views/247/tasks` The done_at field is not updated: ``` [ { "id": 1, "done": true, "done_at": "0001-01-01T00:00:00Z", ... }, { "id": 2, "done": true, "done_at": "0001-01-01T00:00:00Z", ... } ] ``` `percent_done` and other fields are not expected to change unless explicitly included in the payload, which is correct. It seems the issue originates in [bulk_task.go](https://github.com/go-vikunja/vikunja/blob/2538806512e142dac3c2ad8cc1ce4bd9b70b4c81/pkg/models/bulk_task.go#L105-L115), where the columns being updated do not include done_at and other fields. For reference, the full list of task columns can be found in [tasks.go](https://github.com/go-vikunja/vikunja/blob/2538806512e142dac3c2ad8cc1ce4bd9b70b4c81/pkg/models/tasks.go#L1052-L1068) ### Vikunja Version v1.0.0-rc1-120-25388065 ### Browser and version _No response_ ### Can you reproduce the bug on the Vikunja demo site? Yes ### Screenshots <img width="434" height="565" alt="Image" src="https://github.com/user-attachments/assets/f1868ef2-e0dd-4616-b785-3548c5be72d3" /> <img width="913" height="898" alt="Image" src="https://github.com/user-attachments/assets/c924285a-ab79-4a0c-9085-6f74c256244f" />
Author
Owner

@kolaente commented on GitHub (Sep 10, 2025):

Should be fixed in https://github.com/go-vikunja/vikunja/pull/1456. Please check with the next unstable build (should be ready for deployment in ~30min, also on try).

Note the syntax for the bulk update endpoint changed, check the swagger docs for details.

@kolaente commented on GitHub (Sep 10, 2025): Should be fixed in https://github.com/go-vikunja/vikunja/pull/1456. Please check with the next unstable build (should be ready for deployment in ~30min, also on [try](https://try.vikunja.io)). Note the syntax for the bulk update endpoint changed, check the swagger docs for details.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#604