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
Conversation
Those can be used in the /filter routes.
Those can be used in /filter route. Depends on discourse/discourse#26770 Internal ref. /t/127278
Those can be used in /filter route. Depends on discourse/discourse#26770 Internal ref. /t/127278
* 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") } |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Will fix 👍
There was a problem hiding this comment.
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
Ensures we clean up any custom filters added in the specs to prevent any leaks when running the specs. Follow up to #26770 (comment)
Ensures we clean up any custom filters added in the specs to prevent any leaks when running the specs. Follow up to #26770 (comment)
Ensures we clean up any custom filters added in the specs to prevent any leaks when running the specs. Follow up to #26770 (comment)
Those can be used in the /filter routes.