Upcoming cards widget returns no items through the dashboard API

Abierto Apto para principiantes
#8,845 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
72/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
php
Área
api, backend

Línea de trabajo

Sigue DeckWidgetUpcoming::getItems() y OverviewService::findUpcomingCards() para confirmar cómo llegan los resultados agrupados al filtro del widget del panel. Empieza por localizar esos métodos y revisar las pruebas existentes para las tarjetas próximas o los elementos del widget del panel. La tarea estará terminada cuando la API del panel devuelva las tarjetas vencidas en la respuesta esperada del widget.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
JavaScript
Estrellas
1.4k
Forks
380
Merge medio
1 d 17 h
PR fusionados (30 d)
72

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de nextcloud/deck

Todos los issues de nextcloud/deck

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.