Skip to main content

Support Tickets

CmSupportTicket lets users raise support tickets from the admin panel. Tickets and their comments sync with a project in Bridge.

Quick example​

rails g cm_admin:add_cm_support_ticket
rails db:migrate
config/initializers/cm_admin.rb
config.included_models = [..., CmSupportTicket]

Setup​

Your app (e.g. DRE, port 3000) syncs tickets to a Bridge app (port 3001) running alongside it.

1. Prepare the Bridge app​

  • Create a project for your app in Bridge, where tickets can be created.
  • Create a cm-admin installation and associate it with the project.
  • Copy the project key β€” you need it for the credentials step below.

2. Run the generator​

rails g cm_admin:add_cm_support_ticket

Creates three migrations: cm_support_ticket, cm_support_ticket_user (for assignees), and created_by_name/email columns on cm_comment.

3. Register the model​

config/initializers/cm_admin.rb
CmAdmin.configure do |config|
config.included_models = [
# ... other models,
CmSupportTicket
]
config.sidebar = [
# ... other items,
{ path: :cm_index_cm_support_ticket_path }
]
end

4. Set the project key​

In development, put the Bridge project key in credentials:

cm_admin:
project_access_key: your_project_key_here

In staging and production, set the same key in the BUNDLE_CM___GEMS__COMMUTATUS__COM environment variable β€” that is where cm-admin reads the project key outside development. Generate the key in Bridge and keep the staging key updated in the staging Bridge environment.

Notes​

  • Run Sidekiq on only one of the two apps. Running it on both lets jobs execute on the wrong app.