Repository navigation
fix(aggregation): filters accept IS NULL, IS NOT NULL and [isnull], as the list does - #4680
Merged
Merged
Conversation
…s the list does The grouped and plain aggregations compared IS NULL as literal text and refused the isnull operator, so chip counts on a page filtered on an empty field (dossiq's Queue, assignee IS NULL) drew nothing. Emptiness is now read by one NullFilter, shared with the list search and nested-path filters, on both the native SQL path and the PHP fallback. Also adds Dutch for the flow step names and descriptions on the palette. Assisted-by: ClaudeCode:claude-opus-5-5
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.
What
The aggregation endpoints (
/api/objects/aggregations/{register}/{schema},.../grouped, named aggregations) accept the list endpoint's "empty" / "filled" filter syntax:assignee=IS NULLandassignee=IS NOT NULL;assignee[isnull]=true|false(true, "true", "1", "on", "yes" ask for empty; anything else for filled)."Empty" means a missing or SQL NULL value, exactly as on the list endpoint. Both the native SQL path (
field IS NULL/IS NOT NULL;isnullno longer makes it bail) and the PHP fallback apply it.One reader, not a second parser
The meaning lives in
lib/Support/NullFilter.php(nullCheck(),isNullOperatorAsksForNull(), theIS NULL/IS NOT NULL/isnullconstants). The list search (MagicSearchHandler::isNullOperatorAsksForNull()), nested-path filters (NestedPathFilter) and the aggregation runner all read it, so the endpoint that lists a page and the one that counts its chips cannot disagree about what "empty" is.Authorization
Unchanged: the native path keeps the reader's row predicate (
rbacRowPredicateSql) and organisation scope in the same WHERE; the PHP fallback filters the rows it already hydrated under the same rules.Why
nextcloud-vue's
quickFiltersFromand chip counts count through the grouped aggregation with the page filter. On dossiq's Queue (assignee: IS NULL)IS NULLwas compared as literal text (empty groups) and[isnull]=truewas refused ("Unsupported aggregation filter operator isnull"), so the chips drew nothing while the list showed rows.Also in this PR
Dutch for the OpenRegister flow step names and descriptions on the palette (53 strings in
l10n/nl.jsonandl10n/nl.js; "When someone runs it" is "Als iemand hem start"), written without em-dashes.Verified locally
NullFilterTest(3, new),AggregationRunnerMultiValueFilterTest(17, 3 new: PHP fallback in every spelling, native groupedIS NULLand[isnull]=falseSQL and counts), all oftests/Unit/Service/Aggregation/(276),FilterParamsTest,MagicSearchHandlerIsNullOperatorTest,MagicSearchHandlerTest,MagicSearchHandlerNestedPathFilterTest: all OK. The new tests fail on development.composer check:strictonce: lint, migration-version, phpcs, phpmd, psalm ("No errors found"), phpstan ("No errors") green; test:all 26,311 tests, 15 errors, the same inheritedAuditTrail*/DraftRemovalAuditRowDB tests that need the server'sOC\DB\Schema\Table(red on development too).AI-assisted: written with Claude Code.