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

DEV: add support for adding custom status filter #26770

Merged
merged 1 commit into from Apr 26, 2024

Conversation

ZogStriP
Copy link
Member

Those can be used in the /filter routes.

Those can be used in the /filter routes.
ZogStriP added a commit to discourse/discourse-solved that referenced this pull request Apr 26, 2024
Those can be used in /filter route.

Depends on discourse/discourse#26770

Internal ref. /t/127278
ZogStriP added a commit to discourse/discourse-solved that referenced this pull request Apr 26, 2024
Those can be used in /filter route.

Depends on discourse/discourse#26770

Internal ref. /t/127278
@ZogStriP ZogStriP merged commit 803c275 into main Apr 26, 2024
16 checks passed
@ZogStriP ZogStriP deleted the add-custom-status-filter branch April 26, 2024 12:04
ZogStriP added a commit to discourse/discourse-solved that referenced this pull request Apr 26, 2024
* FEATURE: add new custom status filters

Those can be used in /filter route.

Depends on discourse/discourse#26770

Internal ref. /t/127278

* DEV: pin plugin for Discourse 3.3.0.beta2-dev
fab!(:foobar_topic) { Fabricate(:topic, closed: true, word_count: 42) }

it "supports custom status filters" do
TopicsFilter.add_filter_by_status("foobar") { |scope| scope.where("word_count = 42") }
Copy link
Contributor

Choose a reason for hiding this comment

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

We need to clean up this state so that it doesn't leak across tests.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch. Will fix 👍

Copy link
Member Author

Choose a reason for hiding this comment

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

Will be fixed in #26803

ZogStriP added a commit that referenced this pull request Apr 29, 2024
Ensures we clean up any custom filters added in the specs to prevent any leaks when running the specs.

Follow up to #26770 (comment)
ZogStriP added a commit that referenced this pull request Apr 29, 2024
Ensures we clean up any custom filters added in the specs to prevent any leaks when running the specs.

Follow up to #26770 (comment)
ZogStriP added a commit that referenced this pull request Apr 29, 2024
Ensures we clean up any custom filters added in the specs to prevent any leaks when running the specs.

Follow up to #26770 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants