bugfix/FOUR-26348: The status filter doesn't work when filtering two statuses.#8782
bugfix/FOUR-26348: The status filter doesn't work when filtering two statuses.#8782CarliPinell wants to merge 1 commit intodevelopfrom
Conversation
|
eiresendez
left a comment
There was a problem hiding this comment.
this may not be a bug. If QA used AND, “No results have been found” is expected behavior. The Jira ticket currently says “filter two statuses” but does not specify whether the logical operator was AND or OR, so with this PR we are making a product decision in code.
I would treat this as needing Product/QA clarification before merge. The safer resolution may be to update Jira and close/rework the PR rather than changing filter semantics.
@CarliPinell what do you think?
| * @param {string} columnField - Column field name (e.g. status) | ||
| * @returns {Array} | ||
| */ | ||
| mergeFlatEnumEqualsToOrChainForColumn(filters, columnField) { |
There was a problem hiding this comment.
🔴 Critical Issues
This PR changes explicit AND semantics into OR for multiple = filters on status / process_version_alternative.
Impact: if a user adds Status = In Progress AND Status = Completed, returning no results is expected because a single row cannot have both statuses.
The PR silently rewrites that into OR behavior, which contradicts the selected logical operator and may change valid filter semantics.
Suggested fix: do not merge this until Product/QA confirms the desired UX. If multiple status values should mean OR, the UI should make that explicit by forcing/showing OR, using in, or preventing invalid AND combinations.





Issue & Reproduction Steps
After applying 2 filters to status column , the filter displays the message "No results have been found."
Solution
-Task inbox advanced filters: Group filter rows by column even when _column_field is missing or "N/A", by resolving status and process_version_alternative from the filter subject (resolveAdvancedFilterGroupKey + isTaskStatusColumnFilter). This lets multiple status rows merge correctly instead of being split across buckets and AND-ed by the API.
-Multiple = on the same enum column: Instead of collapsing to operator: "in", multiple = values for status / process_version_alternative are serialized as a single filter object with nested or chains of operator: "=" (same OR semantics as IN, compatible with ProcessMaker\Filters\Filter).
Default inbox status: Default “In Progress” (and URL-driven variants) uses the same subject shape as the column filter (Field + status) so it merges cleanly with user-defined status filters.
Backward compatibility
API contract: Payload remains a JSON array of advanced-filter objects consumed by the existing Filter::filter() pipeline; or nesting is already supported (see existing filter tests). Single-value filters and non-enum columns are unchanged.
Behavior: One status still behaves as before; multiple status values still mean OR (tasks matching any selected state), not AND—only the representation changed from in to nested = + or.
Saved searches / stored configs: Filters that already had _column_field behave as before; configs that lacked it now group correctly instead of failing silently.
How to Test
Related Tickets & Packages
https://processmaker.atlassian.net/browse/FOUR-26348
Code Review Checklist