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

Nested data providers return no results when multiple filters are applied to them. #13505

Open
1 task done
ConorWebb96 opened this issue Apr 17, 2024 · 2 comments
Open
1 task done
Labels
avalanche OSS team bb-filtering Filtering data bug Something isn't working data provider env - production Bug found in production Medium priority Created by Linear-GitHub Sync

Comments

@ConorWebb96
Copy link
Contributor

Checklist

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

Hosting

  • Self
    • Method: docker-compose
    • Budibase Version: 2.23.6
    • App Version: 2.23.6

Describe the bug
Nested filtered data providers return no results even though their filtering logic seem to be correct. This only happens when more than 1 filter is added to the nested data provider. At the top level data provider no issues seem to occur.

To Reproduce
Steps to reproduce the behavior:

  1. Import the attached app below
  2. Go to the home screen
  3. Look at the filters and see that it should return 2 records.
  4. See error

Expected behavior
6 records should be shown whenever referencing the nested data provider.

Screenshots
Main filter nothing is set returns all rows within a table.
Screenshot 2024-04-17 at 09 51 59
Nested filter 2 filters are set nothing is returned even though every row within main provider is either value a or b.
Screenshot 2024-04-17 at 09 52 11

App Export
test nested-export-1713343985090.tar.gz

@ConorWebb96 ConorWebb96 added bug Something isn't working data provider env - production Bug found in production bb-filtering Filtering data avalanche OSS team Medium priority Created by Linear-GitHub Sync labels Apr 17, 2024
@aptkingston
Copy link
Member

aptkingston commented Apr 17, 2024

The issue with this one is that applying filters to a data provider which is using another data provider as its source, will only do fake in-memory filtering. Looking at the code, right now that code does not fully support the "match any" constraint. It will properly check if any operator passes, but for each operator is does a "match all" on all the values.

i.e. this fails because it is 2 filters using the same "equal" operator.

This is a bug in the code so can be fixed. However I would still discourage this setup because it's doing in-memory filtering rather than server-side filtering.

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

No branches or pull requests

2 participants