1
0
mirror of synced 2026-05-22 21:53:18 +00:00

238 Commits

Author SHA1 Message Date
Natalie Tay f96aceb5f4 FIX: Use SolvedTopics to list posts in /activity/solved instead of user actions (#376)
In https://github.com/discourse/discourse-solved/pull/342 we moved solutions away from topic_custom_fields into proper tables, with the tables as the proper source of truth to a topic's solution.

The user's /my/activity/solved route uses user_actions which is not accurate, and a user has reported a bug where their solution is not reflected there (user actions are not a good representation of what a topic's solution is). 

This commit introduces 
- a new route to get solutions, and is mindful `hide_user_profiles_from_public` and such settings
- also mindful of PMs and private categories
- a new template that makes use of the `<UserStream>` to load posts safely and avoid reimplementation
2025-07-02 16:56:12 +08:00
Discourse Translator Bot cee0ffc199 Update translations (#375) 2025-06-24 16:29:51 +02:00
Discourse Translator Bot 03804e1065 Update translations (#373) 2025-06-17 23:08:17 +02:00
Discourse Translator Bot e2a09417a2 Update translations (#355) 2025-04-03 00:05:10 +02:00
Natalie Tay a8a3554cec FEATURE: Add setting to show who marked as solved (#347)
This commit adds the site setting `SiteSetting.show_who_marked_solved` and also the following tooltip to answer posts.
2025-03-26 11:43:22 +08:00
Discourse Translator Bot d88ea600b9 Update translations (#345) 2025-03-25 17:23:18 +01:00
Natalie Tay 5a0c875885 FEATURE: Show 'marked solved by' in OP when topic is solved (#343)
Depends on: https://github.com/discourse/discourse-solved/pull/342

This feature adds the "Marked solved as" information to the solved post appended to OP.

Originally, I had moved the widget usage to a [component](https://github.com/discourse/discourse-solved/blob/39baa0be4a889fdbff108e887a677d9a298d27d4/assets/javascripts/discourse/components/solved-post.gjs), but due to "cooking quotes", after some internal discussion (t/95318/25) we will stick to widgets for now as the post-stream gets modernized.
2025-03-25 17:14:02 +08:00
Natalie Tay e82c6ae1ca DEV: Autoload and segregate features to prep for migration (#341)
This commit autoloads plugin files, and also extracts features into their own modules.
- `plugin.rb` is smaller
- external plugins like discourse-automation and discourse-assign have their own entrypoints
- solved filters as well
2025-03-21 11:45:19 +08:00
Discourse Translator Bot e6cda87505 Update translations (#328) 2025-01-14 16:20:09 +01:00
Discourse Translator Bot 3f724bf311 Update translations (#326) 2025-01-03 14:02:07 +01:00
Discourse Translator Bot 1bbdfd8f56 Update translations (#304) 2024-08-13 16:32:14 +02:00
Osama Sayegh 77c07edf82 FIX: Don't allow TL4 users to unconditionally accept solutions (#305)
A while ago the `accept_all_solutions_allowed_groups` setting was introduced to replace the `accept_all_solutions_trust_level` setting and to make the plugin more flexible by allowing admins to choose groups that are allowed to accept solutions instead of trust levels.

The new group-based setting includes the TL4 group by default. However, removing the TL4 group from the setting doesn't actually remove TL4 users permission to accept solution.

The reason for this bug is that the `can_accept_answer?` guardian method calls `can_perform_action_available_to_group_moderators?` which always allows TL4 users to perform category moderator actions:

https://github.com/discourse/discourse/blob/56524f4bdf9d45eddf7967ccead169ec6dd6cbb8/lib/guardian/topic_guardian.rb#L342-L348

This commit fixes the bug by checking if the user is a moderator on the topic's category (by calling the `is_category_group_moderator?` guardian method) instead of checking if the user can perform category moderator actions. In our case, `is_category_group_moderator?` is equivalent to `can_perform_action_available_to_group_moderators?` except for the TL4 check which is what we need.

Internal topic: t/134675.
2024-08-09 14:59:28 +03:00
David McClure dc1ef92be2 DEV: improve copy for ignore solved topics (#301) 2024-08-01 09:37:29 +02:00
Discourse Translator Bot 0068c8597e Update translations (#300) 2024-07-31 00:15:03 +02:00
Discourse Translator Bot f81f1a1629 Update translations (#295) 2024-05-31 12:30:04 +02:00
Discourse Translator Bot e433fea14e Update translations (#293) 2024-05-21 17:41:10 +02:00
Discourse Translator Bot d18372a47b Update translations (#291) 2024-05-14 16:20:03 +02:00
Tobias Eigen 3e3097a713 UX: Clarify that admins and mods can accept solutions (#288)
Admins and mods can always accept solutions, even if not specified in the `accept_all_solutions_allowed_groups` setting.
2024-05-13 13:42:07 +03:00
Osama Sayegh fac9227417 UX: Add admins and moderators to mandatory_values for accept_all_solutions_allowed_groups (#290) 2024-05-12 20:25:57 +02:00
Gabriel Grubba 9db72efb38 FEATURE: change status on unsolve & fix assign changes (#289)
* FEATURE: change status on unsolve & fix assign changes

When a topic is unsolved, it should have an option,
defined in the settings, to change its status to that state.

Fix assign changes when a topic was solved, previously it was
changing the assignee.

* DEV: Change names in tests and remove comments

* DEV: Update change status on solve implementation

Update tests to verify that the change status on solve feature is working as expected.
Change the implementation to loop throught the topic assignments and update the status.

* DEV: address review feedback
2024-05-08 15:17:45 -03:00
Discourse Translator Bot e405ef1f6c Update translations (#287) 2024-04-30 21:57:42 +02:00
Gabriel Grubba 2b6e17d1d5 FEATURE: Prevents assign notification & change status on solved (#285)
* FEATURE: Prevents assign notification & change status on solved

Relates to this [topic](https://meta.discourse.org/t/assign-plugin-for-informatica/256974/94)

Add an event listener to `accepted_solution` event

Add `assigns_reminder_assigned_topics_query` modifier to not notify if
`prevent_assign_notification` setting is on.

Add settings to prevent assign notification and change status on solved

* DEV: Address review comments

Update SiteSettings names.

* DEV(WIP): Add tests for integration with discourse-assign

Add test for integration with discourse-assign plugin
checks if the assignment status is moved to `Done`

* DEV: lint solved_spec.rb

* DEV: Update test where it updates all assignments

Change `on(:accepted_solution)` is defined

Update test to use acting_user instead of admin

* DEV: lint & add tests for assigns_reminder_assigned_topics_query

Linted and added tests for `assigns_reminder_assigned_topics_query` modifier.

* DEV: Update tests based on review feedback

change plugin_initializer location

update spec with new tests to test integration with discourse-assign

* DEV: Add describe to spec for discourse-assign integration tests

* DEV: update describe name for discourse-assing spec integration

* DEV: Add more tests to spec for discourse-assign integration

* DEV: Lint solved_spec

* DEV: Lint and update spec to not have `p1` topic inside
2024-04-26 13:21:09 -03:00
Discourse Translator Bot b50b118a79 Update translations (#283) 2024-03-05 16:48:05 +01:00
Discourse Translator Bot 478517b328 Update translations (#278) 2024-01-30 17:04:47 +01:00
Discourse Translator Bot b97a629091 Update translations (#277) 2024-01-23 18:30:29 +01:00
Martin Brennan 444dac8a9a DEV: Change accept_all_solutions_trust_level to group setting (#276)
This refactor makes for easier testing and makes things
more organised, the guardian extensions had no testing
whatsoever and I need some to make the TL -> group change.
2024-01-23 11:45:32 +10:00
Discourse Translator Bot bc9b8c41d4 Update translations (#268) 2023-11-21 14:37:03 +01:00
Martin Brennan 09c138014f DEV: Change settings root from plugins: to discourse_solved (#267)
This is so the plugins settings are better categorized in the site settings UI.
2023-11-13 10:24:04 +10:00
Discourse Translator Bot f7f28cb56f Update translations (#263) 2023-10-24 15:54:00 +02:00
Discourse Translator Bot 493c30abe7 Update translations (#258) 2023-10-17 11:08:50 -04:00
Discourse Translator Bot 29bf44807f Update translations (#255) 2023-10-11 11:18:24 +02:00
Krzysztof Kotlarek 7e59ece789 FIX: granular webhooks (#248)
After those core changes we need additional translations

https://github.com/discourse/discourse/pull/23070
2023-10-09 03:26:29 +00:00
Discourse Translator Bot 3b9ecc69c6 Update translations (#253) 2023-08-29 15:51:57 +02:00
Discourse Translator Bot 9af8c4b892 Update translations (#252) 2023-08-23 09:30:42 +02:00
Discourse Translator Bot 62fe282c75 Update translations (#242) 2023-06-20 17:28:18 +02:00
Discourse Translator Bot 113dbe3574 Update translations (#237) 2023-05-10 00:48:20 +02: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
Discourse Translator Bot 29a991e60f Update translations (#234) 2023-04-25 17:22:25 +02: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
Discourse Translator Bot ee55e6d160 Update translations (#231) 2023-03-14 14:47:40 +01:00
Discourse Translator Bot 2c1c64af2b Update translations (#229) 2023-02-28 14:49:20 +01:00
Blake Erickson 65a9ccf876 FEATURE: Add API Scopes (#228)
Adds a single API scope for accepting or unaccepting a solution.
2023-02-23 15:00:14 -07:00
Discourse Translator Bot 8a4daddb8e Update translations (#227) 2023-02-21 17:13:31 +01:00
Osama Sayegh 3492d42a58 FIX: Add title to solved notifications (#226)
This commit adds a title that appears when hovering over solved notifications in the UI.
2023-02-15 16:30:33 +03:00
Discourse Translator Bot 6db8ab53ea Update translations (#225) 2023-02-15 10:53:15 +01:00
Discourse Translator Bot 8580f96fdf Update translations (#224) 2023-01-24 16:31:51 +01:00
Discourse Translator Bot e4b610b676 Update translations (#221) 2023-01-10 20:56:42 +01:00
Discourse Translator Bot a078219a97 Update translations (#215) 2022-11-29 15:39:30 +01:00
Gerhard Schlager 882dd61e11 FEATURE: Add new badges and rename existing badges 2022-11-23 11:07:49 +01:00
Gerhard Schlager d6c8089ca3 FIX: Use generic, static names for badges
This is necessary, because seeding badges with a translated name will result in duplicate badges whenever the default locale changes. The static name solves this.
Moreover, it's not necessary to set the description during seeding. The serializer will localize the names and descriptions at runtime.

The DB migration tries to rename the existing badges by looking them up by their translated time.
2022-11-23 11:07:49 +01:00