Upcoming cards widget returns no items through the dashboard API

未关闭 适合新手
#8,845 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
php
领域
api, backend

调研方向

跟踪 DeckWidgetUpcoming::getItems() 和 OverviewService::findUpcomingCards(),确认分组结果如何到达仪表板小组件筛选器。首先定位这些方法,并检查有关即将到期卡片或仪表板小组件项目的现有测试。完成标准是仪表板 API 在预期的小组件响应中返回到期卡片。

由索引模型根据 Issue 内容生成。

描述

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
The dashboard API always returns an empty list for the "Upcoming cards" widget, whatever cards are due.

DeckWidgetUpcoming::getItems() expects a flat list of cards, but OverviewService::findUpcomingCards() returns them grouped by nodue, overdue, today, tomorrow, nextSevenDays and later. The filter then checks isset($card['duedate']) on each group, which is never true, so everything is dropped.

As a check, I flattened the groups in getItems() with array_merge(...array_values(...)) on the same test instance, and both cards showed up. main has the same code as 1.19.3.

To Reproduce

  1. Create a board with a list and two cards, due in 1 day and in 3 days.
  2. GET /ocs/v2.php/apps/deck/api/v1.0/overview/upcoming with the header OCS-APIRequest: true returns both, under tomorrow and nextSevenDays.
  3. GET /ocs/v2.php/apps/dashboard/api/v1/widget-items?widgets[]=deck with the same header returns {"deck":[]}.

Expected behavior
Step 3 returns the two cards.

Screenshots
n/a

Client details:
n/a, the requests above are plain curl

Server details

Operating system: Debian (Docker image nextcloud:35.0.3-apache)

Web server: Apache

Database: SQLite

PHP version: 8.5.13

Nextcloud version: 35.0.3

Where did you install Nextcloud from: the Docker image, new install

Signing status: not checked, new install

List of activated apps: the default apps and Deck 1.19.3

Nextcloud configuration: the image's defaults

Are you using an external user-backend, if yes which one: no

Logs
Nextcloud log (data/nextcloud.log)

Not captured, the request answers 200.

Browser log

n/a

Validated and reproduced on that live instance. I first saw it on Deck 1.18.6 with Nextcloud 34.

Assisted by ClaudeCode:claude-opus-5-5

主要语言
JavaScript
星标
1.4k
派生
380
平均合并
1 天 17 小时
30 天内合并 PR
72

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

nextcloud/deck 的其他 Issue

查看 nextcloud/deck 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。