Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUDI-7264] Number of filters set is different between Match Any and Match All #11175

Closed
1 task done
melohagan opened this issue Jul 10, 2023 · 2 comments
Closed
1 task done
Assignees
Labels
bb-filtering Filtering data bug Something isn't working env - production Bug found in production Medium priority Created by Linear-GitHub Sync

Comments

@melohagan
Copy link
Collaborator

8Checklist

  • I have searched budibase discussions and github issues to check if my issue already exists

Hosting

  • Self
    • Method: docker compose
    • Budibase Version: 2.8.2
    • App Version: 2.8.2

Describe the bug
When adding filters to a Budibase DB table in the Design section, I noticed that in the settings panel the number of "filters set" changed depending on whether Match any or Match all was selected.

Related issue: #11018

To Reproduce
Steps to reproduce the behavior:

  1. Add filters to a table block for a Budibase DB (see gif)
  2. Switch between Match all and Match any, and save
  3. Notice that Match all has the correct number, whereas Match any has +1 filter count.

Expected behavior
The number of filters set should not change when the Match All/Any setting is changed.

Screenshots

Linear-hosted image

Source image

From SyncLinear.com | BUDI-7264

@melohagan melohagan added bb-filtering Filtering data bug Something isn't working env - production Bug found in production Medium priority Created by Linear-GitHub Sync labels Jul 10, 2023
@melohagan melohagan self-assigned this Jul 10, 2023
@aptkingston
Copy link
Member

Just to speed you up on this, the reason is that we append a filter to indicated that we want "match any".

.concat(matchAny ? [{ operator: "allOr" }] : [])

So in the button where we're counting the filters, we just need to filter out that one before counting them. I'm sure you've probably found this out already, but thought that might help!

@melohagan
Copy link
Collaborator Author

Cheers @aptkingston

Yeah that's what I did, just filtered to make sure a field property existed when counting. Working on the related Match all/any bug here: #11018 before pushing up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bb-filtering Filtering data bug Something isn't working env - production Bug found in production Medium priority Created by Linear-GitHub Sync
Projects
None yet
Development

No branches or pull requests

2 participants