Skip to content
Vino-S edited this page Aug 6, 2026 · 1 revision

Feedback System

Part of Communication-and-Engagement.

Model: app/models/feedback.rb · Controller: app/controllers/feedbacks_controller.rb

Structurally Feedback is Contact-System's twin — same archive/restore/keep/unkeep/convert_to_issue/reply-via-Message shape, same routing-with-fallback pattern, same identifier scheme. The practical difference is intent: Feedback is general site feedback/bug reports/handbook comments rather than a specific "I have a question about this record" contact.

Key fields

title, body (validation requires at least one, not both — title_or_body_exist), feedback_type, name, email_address, user_id, plus the same archive/keep/identifier/GitHub-sync/diagnostics field groups as Contact.

Notable behavior

  • add_email (before_create) looks up the submitter's UseridDetail by user_id and can silently override the form's name/email_address with the logged-in user's profile data.
  • FreeCEN handbook feedback (feedback_type == 'freecen handbook feedback') is a special case: it skips the normal role-routing and goes straight to a hardcoded userid ('GeoffJ') via handbook_feedback_communication.
  • self.github_issue_status_closed is a class method (rake/cron-invoked) that polls GitHub for feedback with an open issue and notifies + flags when it closes.
  • member_can_reply? gates who can reply, checked against ReplyUseridRole::FEEDBACK_REPLY_ROLE.

Routes

resources :feedbacks plus the same shape of custom routes as Contact (list_by_userid, list_by_name, list_by_date, list_by_most_recent, list_by_identifier — routed but no matching controller action, likely dead — list_archived, select_by_identifier, convert_to_issue, userid_feedbacks, userid_feedbacks_with_replies, reply_feedback, feedback_reply_messages, keep/unkeep/archive/restore/force_destroy, new_handbook_feedback).

Clone this wiki locally