Commit Graph

21 Commits

Author SHA1 Message Date
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
Vinoth Kannan 27da70052f FIX: keep quoted content in schema data if post excerpt is empty. 2020-01-04 19:25:42 +05:30
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
Vinoth Kannan 086c5de866 SPEC: Add test cases for topic answer mixin 2019-03-17 23:43:20 +05:30
Vinoth Kannan 8b8512e73e DEV: Use core method to preload category custom fields for site serializer 2019-03-16 23:27:31 +05:30
Vinoth Kannan 8beaa6c1d9 PERF: Remove N+1 queries on basic category serializer. 2019-03-15 18:53:22 +05:30
Vinoth Kannan 0fa41a8b38 PERF: Remove N+1 queries on site serializer. 2019-03-15 17:25:17 +05:30
Vinoth Kannan 5ddd644e00 FEATURE: Show dropdown to filter topic lists by solved status 2019-03-14 00:41:07 +05:30
Vinoth Kannan 3b7baa1a51 FIX: Don't use topic reply count as answer count in 'Question' schema 2019-02-20 00:35:07 +05:30
Vinoth Kannan 9b7d81bd3a add the rspec test cases for commit 684df58 2019-01-16 00:23:38 +05:30
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