해결됨: 리마인더 플러그인

:discourse2: 요약 Solved Reminders PluginSolved 플러그인의 기능을 확장하여 해결된 주제에 대한 추가적인 알림 기능을 제공합니다.
:hammer_and_wrench: 저장소 링크 https://github.com/discourse/discourse-solved-reminders-plugin
:open_book: 설치 가이드 Discourse에 플러그인 설치하는 방법

:warning: 이 플러그인은 현재 활성 개발 단계에 있으며 아직 완전히 완성되지 않았습니다.

Solved Reminders Plugin은 Discourse Solved 플러그인의 기능을 확장하여 종료가 필요한 주제에 대한 알림 및 통지 기능을 추가합니다. 이 플러그인은 사용자가 주제를 해결로 표시하도록 장려하여 효율적인 주제 관리를 돕는 것뿐만 아니라, 축하 메시지로 사용자를 참여시킵니다.

기능

  • 자동 알림: 사용자에게 알림을 보내 주제에 다시 방문하여 해결로 표시하도록 유도합니다.
  • 참여 메시지: 주제를 성공적으로 해결한 사용자에게 축하를 전하고, 도움을 줄 수 있는 추가 주제를 제안합니다.
  • 완벽한 통합: Discourse Solved 플러그인과 함께 작동하여 매끄러운 사용자 경험을 보장합니다.

설치

Solved Reminders Plugin을 설치하려면 Discourse Meta 가이드에 설명된 일반적인 플러그인 설치 과정을 따르세요:

  1. 컨테이너 구성 편집: app.yml 파일의 hooks 섹션에 플러그인의 저장소 링크를 추가하세요.
hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/discourse-solved-reminders-plugin.git
  1. Discourse 컨테이너 재빌드: 애플리케이션을 재빌드하여 플러그인을 적용하세요.
./launcher rebuild app

구성

설치 후, Discourse 관리자 패널을 통해 플러그인 설정을 세밀하게 조정할 수 있습니다. 다음을 조정하는 것을 고려해 보세요:

사용

설정이 완료되면, 이 플러그인은 관리자가 구성한 설정에 따라 자동으로 작동합니다. 관련 사용자에게 알림과 메시지를 보내 주제가 해결에 도달하도록 적극적으로 지원합니다.

사용자에게 게시물을 해결로 표시하도록 상기시키기 위해 전송된 PM:

게시물을 해결로 표시한 사용자에게 전송된 PM:

사용자는 설정에서 유사한 주제를 해결로 표시하도록 추천하는 PM을 비활성화할 수 있습니다:

관리자는 커뮤니티의 필요에 따라 구성을 조정할 수 있습니다.

메시지 텍스트 사용자 지정

사용자에게 전송되는 알림 메시지는 사이트의 외관 → 사이트 텍스트 페이지의 mark_as_solution.message 항목에서 찾을 수 있습니다.

보고 및 데이터 분석

이 플러그인은 Discourse에 특정 데이터베이스 테이블을 추가하지 않지만, Data Explorer 플러그인과 조합하여 알림 메시지의 효과를 추적하고 분석할 수 있습니다.

아래는 이 플러그인과 함께 사용할 수 있는 두 가지 예시 Data Explorer SQL 쿼리입니다.

Solved Reminder 메시지 수

이 쿼리는 Solved Reminder 메시지에 대한 월별 집계 통계를 제공합니다. 이 쿼리는:

  • "There has been a reply on topic you posted"라는 텍스트를 포함하는 개인 메시지를 식별합니다
  • 월별로 데이터를 그룹화하고 다음을 계산합니다:
    • 전송된 알림 메시지 수
    • 이러한 알림을 받은 사용자 총 수
    • 이러한 알림을 읽은 사용자 수
    • 읽음률(읽은 사용자/수신자)
  • 알림 메시지 활동 및 효과의 월별 추이를 보여줍니다
SQL 상세 정보
-- [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 개별 메시지

이 쿼리는 알림 메시지를 받은 각 사용자의 상세한 개인 수준 데이터를 제공합니다. 이 쿼리는:

  • "There has been a reply on topic you posted"라는 텍스트를 포함하는 개인 메시지를 식별합니다
  • 각 개별 수신자를 나열하며 다음을 포함합니다:
    • 사용자 정보(ID, 사용자 이름, 이름, 이메일)
    • 메시지 세부 정보(제목, 링크)
    • 메시지를 읽었는지 여부(TRUE/FALSE)
    • 언제 읽었는지(해당하는 경우)
    • 얼마나 많은 초를 들여 보았는지
  • 결과는 전송 날짜와 사용자 이름으로 정렬되어 각 메시지를 누가 받았고 읽었는지를 정확히 보여줍니다
SQL 상세 정보
-- [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,  -- 사용자 링크로 렌더링됨
  u.username,
  u.name,
  ue.email,
  r.topic_id,       -- 주제 링크로 렌더링됨
  r.message_title,
  -- 메시지에 대한 링크(참조를 위해 수동으로 구성)
  '/t/' || r.message_slug || '/' || r.topic_id AS message_link,
  r.sent_at,
  -- 사용자가 메시지를 읽었는지 확인
  CASE 
    WHEN tu.last_read_post_number > 0 THEN TRUE
    ELSE FALSE
  END AS message_read,
  -- 언제 읽었는지(읽은 경우)
  CASE 
    WHEN tu.last_read_post_number > 0 THEN tu.last_visited_at
    ELSE NULL
  END AS read_at,
  -- 얼마나 많은 시간(초)을 들여 보았는지
  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 
  -- 수신자 목록에서 발신자(시스템/봇) 제외
  tu.user_id != r.sender_id
ORDER BY 
  r.sent_at DESC,
  u.username
17개의 좋아요

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?

4개의 좋아요

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개의 좋아요

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개의 좋아요

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개의 좋아요

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?

5개의 좋아요