FOUR-25589 | Status Filtering In a Settings Tab Created From LaunchPad Does Not Work Correctly#8766
Open
mcraeteisha wants to merge 2 commits intodevelopfrom
Open
FOUR-25589 | Status Filtering In a Settings Tab Created From LaunchPad Does Not Work Correctly#8766mcraeteisha wants to merge 2 commits intodevelopfrom
mcraeteisha wants to merge 2 commits intodevelopfrom
Conversation
When an advanced_filter includes a Status condition, remove any status clauses from the incoming PMQL to avoid duplicate or conflicting status filters. Adds helper methods advancedFilterHasStatus() and removeStatusFromPmql(), and returns early if PMQL becomes empty after removal. The removal uses regex to strip status predicates joined by AND and trims the resulting PMQL.
Add two feature tests to TasksTest that verify status filter precedence for the tasks API. One test (testAdvancedStatusFilterOverridesPmqlStatus) ensures an advanced Status filter overrides a conflicting pmql status clause; the other (testPmqlStatusPreservedWhenNoAdvancedStatusFilter) ensures the pmql status clause is respected when no advanced Status filter is provided. Both tests create an admin user and two ProcessRequestToken tasks (ACTIVE and CLOSED) and assert the returned task IDs match the expected filtering behavior.
|
Contributor
|
QA server K8S was successfully deployed https://ci-ba5b5c61da.engk8s.processmaker.net |
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.





Issue
Ticket: FOUR-25589
When a Saved Search tab (e.g., "To Do") is used in a Launchpad process banner, filtering by a different status (e.g., "Completed") via the column filter popover returns no results.
Solution
The Saved Search's PMQL (e.g.,
status = "In Progress") conflicts with the advanced filter's status (e.g.,Status = "Completed"), producing an impossible SQL condition (status IN ('ACTIVE') AND status IN ('CLOSED')).The fix strips the
statuscondition from the PMQL when the request also includes anadvanced_filterwith aStatustype, allowing the column filter to take precedence. When no status column filter is applied, the PMQL status is preserved as before.How To Test
phpunit tests/Feature/Api/TasksTest.phptestAdvancedStatusFilterOverridesPmqlStatuspassestestPmqlStatusPreservedWhenNoAdvancedStatusFilterpassesci:deploy
Code Review Checklist