You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
flowchart LR
A["`orQueries`-based filters"]
B["Root group-based criteria"]
C["Task filter modal"]
D["All tasks payload"]
E["Request payload builder"]
F["Filter type definitions"]
C -- "restored to" --> B
D -- "restored to" --> B
E -- "passes through" --> B
F -- "removes support for" --> A
The rebuilt base criteria only query by candidateGroupsExpression and no longer include a direct-current-user assignee branch. This should be validated carefully because it appears to reintroduce the original bug where directly assigned tasks do not show up in filtered task lists.
The default All Tasks payload now uses only group-based criteria. Please verify that tasks assigned directly to the current user still appear in the main task list, since this change seems to drop that matching path entirely.
Making candidateGroupsExpression mandatory narrows the filter shape and may be incompatible with assignee-only filters or previously saved payloads that do not include this field. Existing consumers and persisted filters should be checked for breakage.
Using only candidateGroupsExpression here drops tasks that are directly assigned to the current user but are not claimable by one of their groups. Restore the explicit assignee branch so the "All Tasks" view still returns both group-visible and directly assigned work items.
Why: Using only candidateGroupsExpression with includeAssignedTasks can still exclude tasks that are directly assigned to the current user but not tied to one of their candidate groups. Restoring the explicit assignee OR branch materially affects correctness of the All Tasks results.
High
Clear conflicting access filters
The new access-option branches leave the default candidateGroupsExpression active, so a "specific role" or "specific assignee" search can still match the current user's groups and return the wrong task set. Clear the default group-based criteria whenever an explicit access scope is selected.
Why: criteria is initialized with a default candidateGroupsExpression, so adding candidateGroup or assignee without clearing it can leave conflicting filters active and return the wrong task set. Removing the default group-based fields in the explicit access branches is a strong correctness fix for task filtering.
Medium
Normalize legacy filter criteria
Removing the criteria normalization reintroduces a regression for any persisted or default filter that still only has candidateGroupsExpression: directly assigned tasks disappear from the request. Normalize those criteria before building updatedFilter so both group and assignee matches are preserved.
Why: If persisted filters still carry only candidateGroupsExpression, removing this normalization can change their behavior and hide directly assigned tasks when updatedFilter is rebuilt. The concern is plausible and useful, but the proposed fix reintroduces orQueries-based logic that the PR is otherwise moving away from, so its fit is only moderate.
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
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.
User description
Reverts #1143
PR Type
Other
Description
Revert
orQueriestask filter handlingRestore root group-based task criteria
Stop payload criteria normalization
Simplify
FilterCriteriatypingDiagram Walkthrough
File Walkthrough
TaskFilterModalBody.tsx
Revert modal filters to root criteriaforms-flow-review/src/components/TaskFilterModal/TaskFilterModalBody.tsx
includeAssignedTaskscandidateGroupsExpressioncandidateGroupfor specific-role accessassigneeorcandidateGroupallTasksPayload.ts
Restore all-tasks default group criteriaforms-flow-review/src/constants/allTasksPayload.ts
includeAssignedTaskscriteriacandidateGroupsExpressioncriteriataskHelper.ts
Pass through existing task request criteriaforms-flow-review/src/helper/taskHelper.ts
clonedFilter?.criteriadirectlytaskFilter.ts
Simplify task filter criteria typingsforms-flow-review/src/types/taskFilter.ts
candidateGroupsExpressiona direct fieldFilterCriteriato simpler shape