-
Notifications
You must be signed in to change notification settings - Fork 298
Description
Describe the bug
The Deck API provides the following endpoint to change the order of a card:
PUT /boards/{boardId}/stacks/{stackId}/cards/{cardId}/reorder
However, it is currently not possible to reliably change the order
of a card, neither:
- within the same stack, nor
- when moving it to a different stack with a defined
order
.
What I'm trying to do
I am using n8n to automate card sorting in Deck. My goal is:
Sort all cards in a specific stack by duedate
, using the API.
To do this, I loop through all cards in a stack and assign them new order values (0, 1, 2, ...) based on ascending due dates.
Problems I encountered
- Changing order in the same stack has no effect
When I send a PUT request like:
{
"stackId": 122,
"order": 0
}
for a card that's already in stack 122, nothing changes — the card remains at the same position.
Even though the API responds with 200 OK
, the UI shows no update.
This makes it impossible to reorder cards inside a stack programmatically using the API.
- Moving card to another stack doesn't respect target order
If I move a card from stack 122 to stack 123 using:
{
"stackId": 123,
"order": 1
}
the card is inserted at position 4, not at the expected position 2.
Deck internally starts with order = 0
representing the first visible position, so order = 1
should correspond to position 2 — but that’s not what happens.
It seems the card is inserted into the target stack, then sorted in a way that shifts its position further down — possibly because Deck already considers the card inside the stack when applying the order
.
Expected behavior
- I should be able to reorder cards within the same stack using the
order
field. - I should be able to move a card to another stack and place it at a specific position using
order
.
Client details
-
OS: Linux (via n8n)
-
Tool: n8n HTTP Request Node
-
API endpoint used:
/boards/{boardId}/stacks/{stackId}/cards/{cardId}/reorder
-
Deck App version: v1.1
-
Nextcloud version: Nextcloud Hub 9 (30.0.6)
-
Method: PUT
-
Headers:
- OCS-ApiRequest: true
- Content-Type: application/json
Server details
- OS: Ubuntu 22.04
- Web server: Apache
- PHP: 8.3.17
- Database: PostgreSQL
- Installed via: Nextcloud AIO
- External authentication: No