-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
8225: Adding a checkbox to StringFilterForm to control whether an empty value should cause the filter to be skipped #8781
Conversation
…ue should cause the filter to be skipped
… to the IgnoreFilterIfValueIsEmpty checkbox setting
@MatteoPiovanelli-Laser @LorenzoFrediani-Laser please see the changes here. If you're already running the code in your PRs linked above, then you can update your Queries with a recipe for example - adapting the filter configurations is a simple search and replace. |
I believe the safest way to ensure compatibility of the new StringFilterForm operators and to properly add the new boolean parameter where needed inside the FilterRecords is to add a migration step to Orchard.Projections, perhaps using Orchard.Forms.Services.FormParametersHelper to correct the form state. |
I didn't find a proper way to manipulate the form, but we can still adjust the filter in any way to cover the earlier cases. Also, this is still unreleased code, so I'm not that worried about breaking changes. But if you're already running this in production and you can't update filters easily with recipes, then I'm happy to work towards a solution that works for you too. |
src/Orchard.Web/Modules/Orchard.Projections/FilterEditors/Forms/StringFilterForm.cs
Outdated
Show resolved
Hide resolved
I believe we may use a Repository, and we want to edit the column "State", which is similar to: If needed, I can implement the migration phase and give you a branch to cherry pick from or a gist. |
That's all right and I knew how to migrate the data, I just wanted to avoid having it. :) |
I confirm migration works and query execution seems good. |
Awesome, thanks! |
This change is now in |
Fixes #8225
The changes from #8213 are also removed as that functionality is now covered, as well as that of #8226.