Solved Reminders Plugin

:discourse2: Summary Solved Reminders Plugin extends the functionality of Solved plugin by offering additional reminder capabilities for solved topics.
:hammer_and_wrench: Repository Link https://github.com/discourse/discourse-solved-reminders-plugin
:open_book: Install Guide How to install plugins in Discourse

:warning: Note that this plugin is in active development and not yet fully complete.

The Solved Reminders Plugin extends the functionality of the Discourse Solved Plugin by adding reminder and notification capabilities for topics requiring closure. This plugin not only helps in maintaining efficient topic management by encouraging users to mark topics as solved but also engages users through congratulatory messages.

Features

  • Automated Reminders: Sends notifications to users, prompting them to revisit and mark their topics as solved.
  • Engagement Messages: Congratulates users who have successfully solved topics and suggests additional topics they might help solve.
  • Seamless Integration: Works in conjunction with the Discourse Solved plugin to ensure a smooth user experience.

Installation

To install the Solved Reminders Plugin, please follow the general plugin installation process described in the Discourse Meta guide:

  1. Edit your container configuration: Add the plugin’s repository link to your app.yml file under the hooks section.
hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/discourse-solved-reminders-plugin.git
  1. Rebuild the Discourse Container: Apply the plugin by rebuilding your application.
./launcher rebuild app

Configuration

After installation, you can fine-tune the plugin settings through the Discourse admin panel. Consider adjusting:

Usage

Once configured, the plugin will automatically function based on the settings configured by the admin. It actively participates in ensuring topics reach resolution by prompting relevant users with reminders and messages.

PM sent to user to remind them to mark a post as solution:

PM sent to user who marked the post as solution:

Users can disable the PM to recommend similar topics to mark as solution from their preferences:

Admins can adjust configurations as necessary to meet community needs.

Customizing Message Text

The reminder message that is sent to users can be found on your site’s Appearance → Site Text page under mark_as_solution.message.

Reporting and Data Analysis

This plugin does not add any specific database tables to Discourse, however, you can use this plugin in combination with the Data Explorer plugin to track and analyze the effectiveness of your reminder messages.

Below are two example Data Explorer SQL queries you could use with this plugin.

Solved Reminder Message Counts

This query provides monthly aggregate statistics about the Solved Reminder messages. It:

  • Identifies private messages containing the text “There has been a reply on topic you posted”
  • Groups data by month and calculates:
    • Number of reminder messages sent
    • Total number of users who received these reminders
    • Number of users who read these reminders
    • Read rate percentage (readers/recipients)
  • Results show monthly trends in reminder message activity and effectiveness
SQL Details
-- [params]
-- date :start_date = 2024-01-01
-- date :end_date = 2025-12-31
-- text :reminder_text = %There has been a reply on topic you posted%

WITH reminder_pms AS (
  SELECT 
    t.id AS topic_id,
    t.created_at,
    p.id AS post_id,
    p.user_id AS sender_id,
    DATE_TRUNC('month', t.created_at) AS month
  FROM topics t
  JOIN posts p ON p.topic_id = t.id AND p.post_number = 1
  WHERE 
    t.archetype = 'private_message'
    AND t.created_at BETWEEN :start_date AND :end_date
    AND p.raw LIKE :reminder_text
),

recipient_stats AS (
  SELECT
    r.topic_id,
    r.month,
    COUNT(DISTINCT tu.user_id) AS total_recipients,
    COUNT(DISTINCT CASE WHEN tu.last_read_post_number > 0 THEN tu.user_id END) AS read_recipients
  FROM reminder_pms r
  JOIN topic_users tu ON tu.topic_id = r.topic_id AND tu.user_id != r.sender_id
  GROUP BY r.topic_id, r.month
)

SELECT 
  TO_CHAR(month, 'YYYY-MM') AS month,
  COUNT(DISTINCT topic_id) AS reminder_pms_sent,
  SUM(total_recipients) AS total_users_received,
  SUM(read_recipients) AS users_who_read,
  ROUND(100.0 * SUM(read_recipients) / NULLIF(SUM(total_recipients), 0), 2) AS read_rate_percentage
FROM recipient_stats
GROUP BY month
ORDER BY month

Solved Reminder Individual Messages

This query provides detailed individual-level data for each user who received a reminder message. It:

  • Identifies private messages containing the text “There has been a reply on topic you posted”
  • Lists each individual recipient with:
    • User information (ID, username, name, email)
    • Message details (title, link)
    • Whether they read the message (TRUE/FALSE)
    • When they read it (if applicable)
    • How many seconds they spent viewing it
  • Results are ordered by send date and username, showing exactly who received and read each message
SQL Details
-- [params]
-- date :start_date = 2024-01-01
-- date :end_date = 2025-12-31
-- text :reminder_text = %There has been a reply on topic you posted%

WITH reminder_pms AS (
  SELECT 
    t.id AS topic_id,
    t.title AS message_title,
    t.slug AS message_slug,
    t.created_at AS sent_at,
    p.id AS post_id,
    p.user_id AS sender_id,
    p.raw AS message_content
  FROM topics t
  JOIN posts p ON p.topic_id = t.id AND p.post_number = 1
  WHERE 
    t.archetype = 'private_message'
    AND t.created_at BETWEEN :start_date AND :end_date
    AND p.raw LIKE :reminder_text
)

SELECT 
  u.id AS user_id,  -- Renders as link to user
  u.username,
  u.name,
  ue.email,
  r.topic_id,       -- Renders as link to topic
  r.message_title,
  -- Link to the message (manually constructed for reference)
  '/t/' || r.message_slug || '/' || r.topic_id AS message_link,
  r.sent_at,
  -- Check if user has read the message
  CASE 
    WHEN tu.last_read_post_number > 0 THEN TRUE
    ELSE FALSE
  END AS message_read,
  -- When they read it (if they did)
  CASE 
    WHEN tu.last_read_post_number > 0 THEN tu.last_visited_at
    ELSE NULL
  END AS read_at,
  -- How much time spent viewing (in seconds)
  ROUND(tu.total_msecs_viewed / 1000.0, 1) AS time_viewed_seconds
FROM reminder_pms r
JOIN topic_users tu ON tu.topic_id = r.topic_id
JOIN users u ON u.id = tu.user_id
LEFT JOIN user_emails ue ON ue.user_id = u.id AND ue.primary = TRUE
WHERE 
  -- Exclude the sender (system/bot) from the recipients list
  tu.user_id != r.sender_id
ORDER BY 
  r.sent_at DESC,
  u.username
15 Likes

Could the congratulatory PM state the topic title in its title? If the user gets multiple Solutions at one tkme, it could be confusing for the user if they do not know which Solution the PM is referring to.
Could there be a setting to control after n posts will rhe reminder be sent?

3 Likes

Just to double-check on two things:

  1. Does it only ever message the authors of topics that received at least 1 reply?
  2. Does it work together with the per-category solution plugin setting, meaning that if you want to disable it for some categories, you must disable the site-wide solutions plugin toggle and instead enable it for the categories where you want to use it?
3 Likes

Are the suggested topics random unsolved topics, or conversations that are related to the original solved topic? If they are related, how are they identified?

1 Like

2 posts were split to a new topic: How to turn source code into a plugin

I could see this being extremely helpful, especially in our forum where people tend to forget to mark a reply as a solution after receiving one, and then our team would have to go in a remind them manually :weary:

Some other questions I have are:

  • Can we configure who send out the reminder PM, or is it always defaulted to Discobot?
  • Can we also tweak the PMs’ texts if we wanted to?

Thanks

1 Like

Thanks for this plugin, very helpful!

As I understand it, the notifier for this runs only every 14 days. That means that however many topics I’ve started in 14 days (and not marked as solution) will spawn DM + email.

I just ran it manually, 5 days after installing the plugin and got 7 DMs (and emails):

This seems a little bit overkill. I know I’m a bit of an outlier as the admin who actively creates a lot of topics at the moment but quite a few of our users create many topics (yay).

Would it be possible to build an option where this notification is combined into 1? So “Mark 7 of your posts as solution” in 1 message instead of a message per thread?

4 Likes