various bug fixes - #2185
Open
SudoThijn wants to merge 19 commits into
Open
Conversation
…alled The audit-trail page's Statistics tab has fetched GET /api/audit-trails/statistics since 620d344 (2025-06-07), but the backend half was never written. The URL fell through to auditTrail#show, where the dispatcher coerces "statistics" to id 0, so every load 404'd on audit trail #0 and the four stat cards silently read 0. Add the missing route (above the {id} routes, per the rule already noted there), controller action and mapper query. Counts are lifetime rather than windowed like the dashboard's plural-keyed variant, so they agree with the unwindowed list beside them, and the keys are singular to match the contract the store and its unit spec already assume. Admin-gated at the framework level with the same requireAdmin() defence-in-depth as index/show. Optional register/schema params leave room to wire the sidebar filters through later. No frontend change needed — the response shape matches what the store has been expecting all along.
t() gets globally imported
RegisterDetail never read its `:id` route param, relying entirely on
RegistersIndex to seed `registerStore.registerItem` before navigating.
Opening or refreshing /registers/2 therefore hit the "no register id"
branch in mounted() and redirected straight back to /registers.
- Seed the register store from the route param in mounted(); the redirect
now only guards the case where no id exists at all.
- Resolve `register` by route param as a fallback, comparing ids as
strings — route params are strings while the API returns numeric ids,
so the old strict compare could never match a route-derived id.
- Drop the redirect on fetch failure: CnDetailPage already renders
dashboardStore.error with a "Back to Registers" action.
- Add a `hydrating` flag so the first paint shows the loading state
instead of flashing "Register not found" before mounted() fetches.
loadSchemas() treated `register.schemas` as an array of ids, but the
dashboard endpoint replaces that field with fully hydrated schema
objects (DashboardService::buildRegisterEntry), so each entry
stringified into GET /api/schemas/[object Object] — one wasted request
per schema. Use the hydrated entries as-is and fetch only bare ids.
Those entries also carry the per-schema `stats` the cards render and
GET /api/schemas/{id} does not return, so the card metrics and pie
charts were rendering zeros regardless. The `properties: []` -> `{}`
fix-up moves into normalizeSchema(), which copies rather than mutates
because hydrated entries are Pinia store state.
Also fix editSchema(), which called a setSchemaItem action that only
exists on schemaStore, throwing instead of opening the modal.
+ made sure that selected wins
…feature/fixes-and-changes
POST /api/applications silently discarded every quota allocation. The
entity stores one column per allocation but the API exposes them as one
nested object, and there was no setter for that object: hydrate()'s
generic set{Key} call resolved to a non-existent setQuota(), Entity threw
BadFunctionCallException for the unknown attribute, and hydrate()'s
catch-all swallowed it. The response then reported the untouched NULL
columns, indistinguishable from "unlimited".
Add Application::setQuota() to unpack the nested structure onto the
columns. It accepts an array or a JSON string, only writes the keys the
caller actually sent (so a partial quota cannot wipe the rest), treats
non-numeric and null as unlimited, and goes through the magic setters so
dirty-field tracking marks the columns for the UPDATE. Fixing this on the
entity covers create and update alike.
`users` and `groups` had no columns at all — getQuotaData() hardcoded
them to null with a "to be set via admin configuration" note, so the
published shape had two keys that could never be saved. Version1Date-
20260728000000 adds nullable user_quota / group_quota; strictly additive
and idempotent, and existing rows keep the unlimited semantics they were
already reporting. Needs the info.xml bump to run.
Also key the quota addType() registrations by property name. Entity::
setter() looks up $_fieldTypes[$property], so 'storage_quota' never
matched storageQuota and the declared integer cast never applied — a
BIGINT column could surface as a string in the JSON response.
Tests hydrate the reported payload and assert the serialized quota
matches it exactly; without setQuota() that assertion fails with
"null is identical to 128974848".
Contributor
Quality Report — ConductionNL/openregister @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| composer | ✅ | ✅ 174/174 | |||
| npm | ✅ | ✅ 555/555 | |||
| PHPUnit | ✅ | ||||
| Newman | ✅ | ||||
| Playwright | ⏭️ |
Quality workflow — 2026-07-29 13:29 UTC
Download the full PDF report from the workflow artifacts.
claude did this to trigger an update, forgot to remove it
Replaces the hand-rolled index view — manual .viewContainer/.viewActionsBar
chrome, a raw <table class="viewTable">, its own select-all state machine and
PaginationComponent — with CnIndexPage, matching the six already-converted
openregister index views.
The view is table-only: view-mode="table" plus :available-view-modes="['table']"
and :show-view-toggle="false", so no view toggle renders.
Every existing feature is preserved: the coloured Action badge (now
CnStatusBadge + :color-map in place of hand-written .actionBadge CSS),
per-action row accents, View Details / View Changes (still conditional on
hasChanges) / Copy Data with its copied-state flash / Delete, the filtered
Export action, the $root sidebar filter bus, and the empty state with its icon
and description.
Bulk delete moves from a bare window.confirm() to the library's
CnMassDeleteDialog via show-mass-delete + @mass-delete + setMassDeleteResult,
so entries are listed as "Audit trail #<id>" and can be dropped individually
before confirming.
Fixes carried in the same change:
- exportFilteredAuditTrails read auditTrailStore.filters, which does not exist
— the state field is auditTrailFilters. Every export was silently dropping
all active filters, including the dateFrom/dateTo range the compliance
export requires.
- The bulk-delete fetch sent no requesttoken header, which Nextcloud CSRF
rejects. Added, matching the store's own request pattern.
- The row accent is now keyed on the CnStatusBadge variant resolved from
actionColorMap rather than on the raw action name, so the accent colour
always equals the badge colour — the old CSS disagreed on create (blue accent
vs green badge) and read (grey accent vs blue badge). It also stops dotted
actions (file.renamed, referential_integrity.*) from producing a two-token
class name.
- OC.Notification.* replaced with showSuccess/showError from @nextcloud/dialogs.
Row accents use inset box-shadow rather than border-left, per nextcloud-vue
rule 8: a border adds layout width and shifts the row's cell content sideways.
Adds the two new keys ("Audit trail #{id}", "NO ACTION") to all 37 locales in
both l10n/<lang>.js and l10n/<lang>.json. Wording follows each locale's own
already-translated sibling keys, preserving per-locale ordinal conventions
(es "n.º {id}", fr "n°{id}", it "n. {id}") and word order (hu, tr lead with the
id).
Not changed, and worth a follow-up decision: openspec/specs/audit-trail-immutable
requires audit entries to be undeletable and records DELETE
/api/audit-trails/{id} and destroyMultiple returning 405, so the per-row and
bulk delete actions this view exposes are likely dead against a compliant
backend. They are carried over as-is rather than silently dropped.
Contributor
Quality Report — ConductionNL/openregister @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ❌ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| composer | ✅ | ✅ 174/174 | |||
| npm | ✅ | ✅ 713/713 | |||
| PHPUnit | ⏭️ | ||||
| Newman | ⏭️ | ||||
| Playwright | ✅ |
Quality workflow — 2026-08-03 11:54 UTC
Download the full PDF report from the workflow artifacts.
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.
No description provided.