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

Inability to Switch Between AND/OR Operators in Filter Selection #7112

Open
Nonilas opened this issue Feb 19, 2025 · 1 comment
Open

Inability to Switch Between AND/OR Operators in Filter Selection #7112

Nonilas opened this issue Feb 19, 2025 · 1 comment

Comments

@Nonilas
Copy link

Nonilas commented Feb 19, 2025

Describe the bug
When attempting to apply multiple filters (e.g., on projects or datasets), the interface does not allow switching between the logical operators “AND” and “OR.” As a result, you can only use one operator, limiting the flexibility of filter combinations.

To Reproduce

  1. Steps to reproduce the behavior:
  2. Go to the page where you can see projects and click on any.
  3. Now that you are inside a dataset, you can filter the data based on its metadata
  4. Add a filter (e.g., by status or date).
  5. Attempt to add another filter and try to which to a different logical operator (switch from “AND” to “OR,” or vice versa).
  6. Notice that the interface does let you switch but both the operators, for both the filters switched.

Expected behavior
The filtering interface should allow selecting either “AND” or “OR” for each additional filter, enabling more complex and flexible queries based on multiple conditions.

Screenshots
Image

Image

Environment
HOST:

  • OS: RHEL
  • Label studio version 1.16.0 (image heartexlabs/label-studio:1.16.0)
  • Run in docker compose

CLIENT:

  • OS: Windows
  • Browser: Edge and Opera
@heidi-humansignal
Copy link
Collaborator

Hello,

Thank you for contacting Label Studio,

We apologize for any inconvienence this might have caused. Currently, the filtering mechanism doesn't allow for the combination of AND/ OR operators to be applied.

As a workaround, you might consider one of the following:

  • Separate Queries: Run separate filter queries and then combine the results externally.
  • Using the SDK: If you’re comfortable with the Label Studio SDK, you can fetch tasks using your current filters and then post-process the results programmatically to achieve more complex logic.
    We appreciate your feedback, and your request for enhanced filtering flexibility is noted for future improvements. Please let me know if you need any further assistance or additional details.

Comment by Oussama Assili
Workflow Run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants