Discourse Solved

:discourse2: Summary Discourse Solved allows users to accept solutions on topics in designated categories.
:hammer_and_wrench: Repository Link https://github.com/discourse/discourse-solved
:open_book: Install Guide How to install plugins in Discourse

Configuration

To enable Solved on a single category:

  • Navigate to a category page and click on the category settings button

  • Navigate to the settings sections

  • scroll down and enable the Allow topic owner and staff to mark a reply as the solution setting

    image

To enable Solved on all categories:

Enable the allow solved on all topics site setting

/admin/site_settings/category/all_results?filter=allow_solved_on_all_topics

How does it work?

As the OP (topic creator), you will have a button that allows you to accept an answer.

Topics with accepted answers are highlighted and linked in the topic list:

image

Accepted answers are highlighted in the first post:

Some sites might benefit from a solved/unsolved indicator on topic lists. If that’s your cup of tea, you can enable the empty_box_on_unsolved site setting.

admin/site_settings/category/all_results?filter=empty_box_on_unsolved

image

Search

When searching for topics, you can filter the search to only solved or unsolved topics via the status:solved and status:unsolved queries. “are solved” and “are unsolved” can also be found via the “Where topics” dropdown.

Filters

You can enable a filter dropdown in topic list pages using the site setting show_filter_by_solved_status

admin/site_settings/category/all_results?filter=show_filter_by_solved_status

solved-filter

You can also filter solved/unsolved topics by adding a parameter to the URL. For example:

https://meta.discourse.org/c/support?solved=yes

or

https://meta.discourse.org/c/support?solved=no

These links could be added above a specific category list by following these instructions:

Marked Solution Reminder

On topics where solutions are able to be marked, Discourse will display a “Has your question been answered” popup message when the following criteria is met:

  • The topic does not have an accepted answer
  • The topic has at least one reply from another user
  • The author of the topic is logged in and able to accept a reply as an answer
  • The topic has existed for at least 7 days

If you want to prevent this popup message from being displayed, you can use the following CSS in a theme component to hide it:

.topic-navigation-outlet.no-answer {
    display: none;
}
Extra details on how to add this to your site
  • Go to /admin/customize/themes
  • Click on install and then create new
  • Give it a name, and select ‘component’.
  • Create
  • Add it to your theme
  • Click on the Edit CSS/HTML button and paste the code into the Common tab

And save. :+1:

Solved Badges

Name Description Long Description Type Grouping
Solved! Have a reply marked as a Solution This badge is granted for having a reply marked as a Solution to a topic. :white_check_mark: Nice job. :+1: :3rd_place_medal: Community
Guidance Counsellor Have 10 replies marked as Solutions This badge is granted for having 10 of your replies marked as Solutions to topics. :white_check_mark: You are a true asset to your fellow community members. :2nd_place_medal: Community
Know-it-All Have 50 replies marked as Solutions This badge is granted for having 50 of your replies marked as Solutions to topics. :white_check_mark: You really know your stuff. :clap: :1st_place_medal: Community
Solution Institution Have 150 replies marked as Solutions This badge is granted for having 150 of your replies marked as Solutions to topics. :white_check_mark: Excellent work. :slightly_smiling_face: You are officially a Solution Institution. :brain: :1st_place_medal: Community

Note: these badges may be disabled by default. You can enable them by toggling Enable badge in Admin → Badges

Data Explorer Queries

To list each individual “solved” event:

SELECT acting_user_id, target_topic_id, target_post_id, created_at FROM user_actions
WHERE action_type=15
ORDER BY created_at DESC

To produce a list with stats per-user: (with variable for time interval, defaults to 1 year):

-- [params]
-- string :interval = 1 year
SELECT  ua.acting_user_id, 
        count(case t.user_id when ua.acting_user_id then 1 else null end) as is_op, 
        count(case t.user_id when ua.acting_user_id then null else 1 end) as not_op,
        count(*) as total
FROM user_actions ua
LEFT JOIN topics t ON target_topic_id = t.id
WHERE action_type=15
AND ua.created_at >= CURRENT_DATE - INTERVAL :interval
GROUP BY ua.acting_user_id
ORDER BY total DESC

Original spec discussion


This is an official plugin, and we plan to ship it to all our customers. Thank you to Western Digital for funding the development of this plugin!

147 Likes

It would be useful in our case to be able to have an OP select the option of whether or not a given topic requires a solution, and to offer this option for all categories in our forums. In the absence of that, I am considering creating a general “Questions/Issues for Membership” category, which a moderator could then move to the appropriate category after the issue is marked as solved.

My question is, if the topic is solved and then moved to the a different category where the Solved Plugin is not enabled, will the topic lose the solution markup?

1 Like

Good Question…

Answer yes it keeps markup. Lounge is not a Solved Enabled Category.

Third post was created after the M9ve notice it does not have solution option. Post 2 has it visible but not selectable(Though might be due to only one choice).

Topic List also shows it was a Solved Topic by the Check Mark


If your looking to have a Database categorized. Your general help topic could have tags your staff could apply to them if not categorized by the tap appropriately by the Op…

Docs plugin also maybe good to use as a possible easy to use Search Solved Help topics by Tag.

2 Likes

Feature Request: Allow us to mark multiple replies as solutions, I made three devforum posts about it, and it’s all in this link below :slight_smile:

1 Like

Create a new feature topic and mention the text you said.

No need to do that. There is a feature topic and he posted there too

2 Likes

I did and it was moved there, and no need to make more when there is one

1 Like