feat(views): kanban + calendar presentation config — backend (#2059) - #2063
Merged
Conversation
Adds the backend contract for object-views-kanban-calendar: a nullable
`presentation` JSON column on View (viewType table|kanban|calendar +
kanban/calendar config), validated on create/update against the view's
schema properties, kanban column derivation (enum order/columnOrder/
facet-discovered distinct values) with per-column paginated cards, and
a calendar date-range object query with optional endDateField spanning.
Two new read-only endpoints (GET /api/views/{id}/kanban and .../calendar)
expose this to the frontend phase; drag-to-move deliberately has no new
endpoint and continues to go through the existing guarded object
PATCH/PUT path, asserted by a dedicated test.
Also fixes a pre-existing bug in View::hydrate(): calling Entity's
magic-__call setters with named arguments (setUuid(uuid: null)) silently
resolves to an undefined $args[0], which the new presentation tests
surfaced as a hard crash on the non-nullable isPublic field. Rewritten
to the field-map + dynamic-method-call pattern already used elsewhere
(e.g. Agent::hydrate()).
Frontend/nc-vue phase (CnObjectKanban/CnObjectCalendar components, the
src/views/ viewType dispatch, and the live smoke test) is phase 2 and
intentionally left for a follow-up change; tasks.md reflects this.
Contributor
Quality Report — ConductionNL/openregister @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ❌ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ❌ | ||||
| stylelint | ❌ | ||||
| composer | ❌ | ✅ 172/172 | |||
| npm | ❌ | ❌ | |||
| PHPUnit | ⏭️ | ||||
| Newman | ⏭️ | ||||
| Playwright | ⏭️ |
Quality workflow — 2026-07-24 11:52 UTC
Download the full PDF report from the workflow artifacts.
This was referenced Jul 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Backend phase of
openspec/changes/object-views-kanban-calendar(#2059). This is NOT the full feature — it lands the server-side contract only; the nc-vue component phase (CnObjectKanban/CnObjectCalendar+src/views/dispatch onpresentation.viewType) is phase 2 and remains after this PR. Do not close #2059.lib/Db/View.php: nullablepresentationJSON property (viewType: table|kanban|calendar + kanban/calendar config), defaulted totablewhen null so existing views are unchanged. MigrationVersion1Date20260724000000adds the column (idempotent, nullable).lib/Service/ViewService.php:create()/update()accept/validate/persistpresentation;groupByField/dateField/endDateFieldare validated against the view's schema properties and an unrenderable config is rejected withInvalidArgumentException.lib/Controller/ViewsController.php: create/update/patch passpresentationthrough (400 on validation failure); two new read-only endpoints —GET /api/views/{id}/kanbanandGET /api/views/{id}/calendar?start=&end=.lib/Service/ViewPresentationService.php(new): kanban column derivation (explicitcolumnOrder> schema enum order > facet-discovered distinct values) with cards paginated per column through the existingObjectService::searchObjectsPaginated(); calendar date-range query (+ optionalendDateFieldspanning) over the same existing object-query surface.x-openregister-lifecycle), asserted by a dedicated test rather than re-implemented.View::hydrate()called Entity's magic-__callsetters with named arguments (setUuid(uuid: null)), which silently resolves to an undefined$args[0]and crashes on the non-nullableisPublicfield. Rewritten to the field-map + dynamic-method-call pattern already used elsewhere (e.g.Agent::hydrate()).Test plan
tests/Unit/Db/ViewTest.php,tests/Unit/Service/ViewServiceTest.php,tests/Unit/Service/ViewPresentationServiceTest.php,tests/Unit/Controller/ViewsControllerTest.php— 123 tests / 270 assertions, green innextcloud:34.0.0-apache.phpcsclean on all changed/addedlib/files.