Label information not included, if single stack is requested.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 354
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 43
Description
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Describe the bug
If all stacks of a board are requested via REST API (GET /boards/{boardId}/stacks), the label information of all cards is included in the response for all stacks.
Example: This is the JSON response of a test board with only one stack and two cards, the second one containing a label.
[
{
"id":24,
"title":"TestStack",
"boardId":7,
"deletedAt":0,
"lastModified":1717319772,
"cards":[
{
"id":833,
"title":"TestCard1",
"description":"",
"stackId":24,
"type":"plain",
"lastModified":1717319754,
"lastEditor":null,
"createdAt":1717194622,
"labels":[
],
"assignedUsers":[
],
"attachments":null,
"attachmentCount":0,
"owner":{
"primaryKey":"Tester",
"uid":"Tester",
"displayname":"Max Mustermann",
"type":0
},
"order":999,
"archived":false,
"done":null,
"duedate":null,
"deletedAt":0,
"commentsUnread":0,
"commentsCount":0,
"ETag":"2ce44df456088877165c8ffb445da29a",
"overdue":0
},
{
"id":834,
"title":"TestCard2",
"description":"",
"stackId":24,
"type":"plain",
"lastModified":1717319772,
"lastEditor":null,
"createdAt":1717194626,
"labels":[
{
"id":187,
"title":"TestTag",
"color":"c4be27",
"boardId":7,
"cardId":834,
"lastModified":0,
"ETag":"cfcd208495d565ef66e7dff9f98764da"
}
],
"assignedUsers":[
],
"attachments":null,
"attachmentCount":0,
"owner":{
"primaryKey":"Tester",
"uid":"Tester",
"displayname":"Max Mustermann",
"type":0
},
"order":999,
"archived":false,
"done":null,
"duedate":null,
"deletedAt":0,
"commentsUnread":0,
"commentsCount":0,
"ETag":"203884e255b00b4169807fb0baa3837f",
"overdue":0
}
],
"order":999,
"ETag":"203884e255b00b4169807fb0baa3837f"
}
]
But if information of an individual stack of a board is requested via REST API (GET /boards/{boardId}/stacks/{stackId}), the label information of the cards is missing in the JSON response. The field of the labels is "null.
This is the JSON response for the same stack, requested for the stack individually:
{
"id":24,
"title":"TestStack",
"boardId":7,
"deletedAt":0,
"lastModified":1717319772,
"cards":[
{
"id":833,
"title":"TestCard1",
"description":"",
"stackId":24,
"type":"plain",
"lastModified":1717319754,
"lastEditor":null,
"createdAt":1717194622,
"labels":null,
"assignedUsers":[
],
"attachments":null,
"attachmentCount":0,
"owner":"Tester",
"order":999,
"archived":false,
"done":null,
"duedate":null,
"deletedAt":0,
"commentsUnread":0,
"commentsCount":0,
"ETag":"2ce44df456088877165c8ffb445da29a",
"overdue":0
},
{
"id":834,
"title":"TestCard2",
"description":"",
"stackId":24,
"type":"plain",
"lastModified":1717319772,
"lastEditor":null,
"createdAt":1717194626,
"labels":null,
"assignedUsers":[
],
"attachments":null,
"attachmentCount":0,
"owner":"Tester",
"order":999,
"archived":false,
"done":null,
"duedate":null,
"deletedAt":0,
"commentsUnread":0,
"commentsCount":0,
"ETag":"203884e255b00b4169807fb0baa3837f",
"overdue":0
}
],
"order":999,
"ETag":"203884e255b00b4169807fb0baa3837f"
}
To Reproduce
Steps to reproduce the behavior:
- Set up a Nextcloud Deck board with a stack containing a card with a label
curl -X GET 'https://<username>:<password>@<NextcloudIPorURL>/index.php/apps/deck/api/v1.1/boards/' -H 'Accept: application/json' -H 'OCS-APIRequest: true' -H 'Content-Type: application/json;charset=utf-8'- Check, if label is included in the response
curl -X GET 'https://<username>:<password>@<NextcloudIPorURL>/index.php/apps/deck/api/v1.1/boards/<boardID>/stacks/<stackID>' -H 'Accept: application/json' -H 'OCS-APIRequest: true' -H 'Content-Type: application/json;charset=utf-8'- Check, if label is not included in the response.
Expected behavior
In case the data of an individual stack is requested, the label information should be included in the JSON resonse.
Client details:
- OS: iOS and macOS
- Version: iOS 17, macOS 14
- Device: iPhone Xs, iPhone 15 Simulator, macBook Air M1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the GET /boards/{boardId}/stacks and GET /boards/{boardId}/stacks/{stackId} REST responses using the reproduction curl commands. Trace the individual-stack endpoint and its card serialization, then verify that cards returned by it include the same label data as the all-stacks response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100