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

Use existing formats for saved filters #5697

Merged
merged 2 commits into from
Mar 3, 2025

Conversation

WithoutPants
Copy link
Collaborator

@WithoutPants WithoutPants commented Mar 3, 2025

#5632 introduced some changes around the format of the saved filters that wasn't fully ready. This existing saved filter format is currently not correct. It's supposed to follow the format of the graphql filter inputs, but instead it's following the schema of the UI object model. Fixing that issue will require a migration to massage the saved filter formats. This PR rolls back the changes to the saved filter format.

Note that this will not fix corrupted saved filters created after the #5632 build.

Resolves #5690

@WithoutPants WithoutPants added the bug Something isn't working label Mar 3, 2025
@WithoutPants WithoutPants added this to the Version 0.28.0 milestone Mar 3, 2025
Copy link
Contributor

@feederbox826 feederbox826 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

everything works but DateCriterionOptions. It clones it with

date:
  modifier: "BETWEEN",
  value: {
    value: "2025-01-01"
    value2: "2025-01-02"
  }
}

and similarly for single value

This occurs not on saving but when selecting the filter by itself. It is saved in this format as well. Hopefully this is as simple as removing the class overrides (looking at public cloneValues())

@feederbox826
Copy link
Contributor

👀 pulling, building and testing now

Copy link
Contributor

@feederbox826 feederbox826 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Fixes the filer format, including Date selector

@WithoutPants WithoutPants merged commit fdb2dd9 into stashapp:develop Mar 3, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report] Default filters not being applied properly
2 participants