Commit Graph

25 Commits

Author SHA1 Message Date
Régis Hanol 2c96c5b67c
FEATURE: add new custom status filters (#286)
* FEATURE: add new custom status filters

Those can be used in /filter route.

Depends on https://github.com/discourse/discourse/pull/26770

Internal ref. /t/127278

* DEV: pin plugin for Discourse 3.3.0.beta2-dev
2024-04-26 16:17:50 +02:00
Penar Musaraj a18ce6d712
FIX: Allow searching for unsolved posts with tags (#284)
When using the `status:unsolved` search filter, the plugin was only
returning results from topics in categories where solved was enabled.

This commit changes the search query to also include topics with tags
that have solved enabled via the `enable_solved_tags` site setting.

This fixes the `status:unsolved tags:tag1` search query.
2024-03-28 16:46:22 -04:00
Loïc Guitaut 4c6ddcf08d DEV: Fix new Rubocop offenses 2024-03-06 10:25:26 +01:00
Régis Hanol b269689ddf
FIX: delete solution with post (#256)
Ensures we remove the solution when the post marked as the solution is deleted.

DEV: Added `IS_ACCEPTED_ANSWER_CUSTOM_FIELD` constant.
DEV: Refactored the `PostSerializer` for better readability.
PERF: Improved the `TopicViewSerializer`'s performance by looking up the `accepted_answer_post_info` from the stream first.

Internal ref. dev/112251
2023-10-13 19:06:03 +02:00
Juan David Martínez Cubillos 4032a1e35f
FIX: Search bug for status:unsolved returns topics from non-solution enabled categories (#241)
* FIX: Search bug for status:unsolved returns topics from non-solution enabled categories

* fixed rubocop issues
2023-06-20 09:52:02 -05:00
Sam b4a740382f
FEATURE: prioritize_solved_topics_in_search to prioritize solved topics (#236)
Many consumers of Discourse solved may want solved topics to show up more
prominently in search. New setting `prioritize_solved_topics_in_search`  (default off) allows 
bumping these topics to the top.

Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
2023-05-03 11:56:10 +10:00
Arpit Jalan bffc46858a
FEATURE: solved topic auto close setting per category (#233)
* FEATURE: solved topic auto close setting per category

This commit adds per category "solved topics auto close hours" setting. The plugin would use the existing "solved topics auto close hours" setting, except if there was a setting for the relevant category in which case that would take precedence.

* minor changes per feedback
2023-04-19 19:44:33 +05:30
David Taylor 14e0800a29
DEV: Introduce syntax_tree for ruby formatting (#217) 2022-12-23 20:36:08 +00:00
David Taylor 9cb67f6706
DEV: Bump rubocop-discourse (#207)
* DEV: Bump rubocop-discourse

* Fix rubocop violations
2022-10-03 22:21:31 +02:00
Joffrey JAFFEUX 56cf5a7dbd
FIX: refresh custom fields and removes dup fabricator (#190) 2022-02-23 10:57:32 +01:00
Krzysztof Kotlarek 5840601025
FEATURE: silently auto close solved topic (#104)
Topic solved should be closed silently as system user involvement may be confusing.

In addition, old rescue block was dropped.

Meta: https://meta.discourse.org/t/discourse-encrypt-unable-to-see-close-message/135235
2020-12-03 15:01:42 +11:00
Vinoth Kannan f04ccbd4e6
FEATURE: send notification to OP when staff marked a post as solution. (#97)
Previously, we won't send any notification to the original poster when a staff user marked a post as the solution on behalf of OP.
2020-10-30 22:01:27 +05:30
jbrw 6f1cf5a779
FEATURE - Category group moderators can (un)accept solutions, if enabled (#89) 2020-07-27 17:42:42 -04:00
Blake Erickson 8d883fba93
FEATURE: Publish WebHook event when solving/unsolving (#85)
* FEATURE: Publish WebHook event when solving/unsolving

This feature will publish a post edit webhook event whenever a solution
is accepted or unaccepted.

I went ahead and used the existing post-edit webhook because all the
post custom fields for the solved plugin are already included in the
post-edit serializer.

* Create Solved Event Webhook

This commit adds a solved event webhook that will only trigger when an
answer has been marked as accepted or unaccepted.

It uses 100 as the webhook ID. This way any new webhooks in core can
keep using lower numbers like 11, 12, 13, but plugins can use 101, 102,
etc.

* Removed functionality that was added to core

This [PR][1] to discourse core adds what what removed in this commit.

It is better to have this logic in core so that it is discoverable and
future webhooks won't end up accidentally using the same ID.

[1]: https://github.com/discourse/discourse/pull/9110

* UX: Add "solved" status filter in advanced search page.

And rename `in:solved` to `status:solved`.

* FEATURE: Publish WebHook event when solving/unsolving

This feature will publish a post edit webhook event whenever a solution
is accepted or unaccepted.

I went ahead and used the existing post-edit webhook because all the
post custom fields for the solved plugin are already included in the
post-edit serializer.

* Create Solved Event Webhook

This commit adds a solved event webhook that will only trigger when an
answer has been marked as accepted or unaccepted.

It uses 100 as the webhook ID. This way any new webhooks in core can
keep using lower numbers like 11, 12, 13, but plugins can use 101, 102,
etc.

* Removed functionality that was added to core

This [PR][1] to discourse core adds what what removed in this commit.

It is better to have this logic in core so that it is discoverable and
future webhooks won't end up accidentally using the same ID.

[1]: https://github.com/discourse/discourse/pull/9110

Co-authored-by: Vinoth Kannan <vinothkannan@vinkas.com>
2020-03-06 11:28:29 -07:00
Sam Saffron e5b08c71c4
FIX: do not allow whispers to be accepted as answers
This also cleans up the guardian so it is easier to reason about
2020-02-23 19:16:31 +11:00
Daniel Waterworth a58984bfca FIX: Fix test suite after fabricated category defaults changed
Categories no longer create definition topics by default
2019-08-06 11:39:09 +01:00
Guo Xiang Tan 75046f1d92 Add frozen string literal comment to files. 2019-05-13 11:04:27 +08:00
Sam Saffron 549c3d339a DEV: use eq_time which allows for 1ms fidelity
This correct the specs due to changes introduced in 9ebabc1d
2019-03-28 17:41:27 +11:00
Bianca Nenciu 3297d152a7 FIX: Staff users can accept posts in deleted topics. (#75) 2019-03-18 16:27:29 +01:00
Guo Xiang Tan 46258a5b11 FIX: Remove auto-close topic timer on unsolved.
https://meta.discourse.org/t/unsolving-a-topic-does-not-remove-autoclose/94907
2018-08-31 12:03:42 +08:00
Sam 5b81cc9293 FEATURE: if auto bump is enabled, do not bump solved 2018-07-18 10:56:56 +10:00
Guo Xiang Tan e49238b1f5 Make tests work with Rails 5.1. 2017-09-01 10:42:31 +08:00
Sam 21195ad957 correct spec 2017-07-18 15:24:09 -04:00
jomaxro 1607b4e107 FIX: Don't open a topic to set an auto-close timer when marking as solved.
Fixes this issue: https://meta.discourse.org/t/marking-closed-topic-solved-with-solve-topics-auto-close-hours-set-causes-topic-to-be-reopened/63593?u=jomaxro

Topics that were closed before being marked as solved would be reopened and have an auto-close timer set.  If a topic is already closed, marking as solved should not cause it to re-open.
2017-06-12 22:29:53 +02:00
Guo Xiang Tan ed8b0103f6 FEATURE: Add `solved_topics_auto_close_hours` site setting.
https://meta.discourse.org/t/automatically-close-solved-topics-after-n-hours/58383
2017-05-22 20:03:49 +08:00