davideisinger.com

My personal website
Log | Files | Refs | README

index.md (2673B)


      1 ---
      2 title: "Unfuddle User Feedback"
      3 date: 2009-06-02T00:00:00+00:00
      4 draft: false
      5 canonical_url: https://www.viget.com/articles/unfuddle-user-feedback/
      6 ---
      7 
      8 Recently, we wanted a better system for managing feedback from
      9 [SpeakerRate](http://speakerrate.com/) users. While we do receive some
     10 general site suggestions, most of the feedback we get involves discrete
     11 corrections to data (a speaker who has been entered into the system
     12 twice, for example). We started to create a simple admin interface for
     13 managing these requests, when we realized that the ticket tracking
     14 system we use internally, [Unfuddle](http://unfuddle.com/), already has
     15 all the features we need.
     16 
     17 Fortunately, Unfuddle has a full-featured
     18 [API](http://unfuddle.com/docs/api), so programmatically creating tickets
     19 is simply a matter of adding
     20 [HTTParty](http://railstips.org/2008/7/29/it-s-an-httparty-and-everyone-is-invited)
     21 to our `Feedback` model:
     22 
     23 ```ruby
     24 class Feedback < ActiveRecord::Base
     25   include HTTParty
     26 
     27   base_uri "viget.unfuddle.com/projects/#{UNFUDDLE[:project]}"
     28 
     29   validates_presence_of :description
     30 
     31   after_create :post_to_unfuddle,
     32     :if => proc { Rails.env == "production" }
     33 
     34   def post_to_unfuddle
     35     self.class.post(
     36       "/tickets.xml",
     37       :basic_auth => UNFUDDLE[:auth],
     38       :query => { :ticket => ticket }
     39     )
     40   end
     41 
     42   private
     43 
     44   def ticket
     45     returning(Hash.new) do |ticket|
     46       ticket[:summary] = topic
     47       ticket[:description] = "#{name} (#{email}) - #{created_at}:\n\n#{description}"
     48       ticket[:milestone_id] = UNFUDDLE[:milestone]
     49       ticket[:priority] = 3
     50     end
     51   end
     52 end
     53 ```
     54 
     55 We store our Unfuddle configuration in `config/initializers/unfuddle.rb`:
     56 
     57 ```ruby
     58 UNFUDDLE = {
     59   :project => 12345,
     60   :milestone => 12345, # the 'feedback' milestone
     61   :auth => {
     62     :username => "username",
     63     :password => "password"
     64   }
     65 }
     66 ```
     67 
     68 Put your user feedback into Unfuddle, and you get all of its features:
     69 email notification, bulk ticket updates, commenting, file attachments,
     70 etc. This technique isn't meant to replace customer-service oriented
     71 software like [Get Satisfaction](http://getsatisfaction.com/) (we're
     72 using both on SpeakerRate), and if you're not already using a ticketing
     73 system to manage your project, this is probably overkill; something like
     74 [Lighthouse](http://lighthouseapp.com/) or [GitHub
     75 Issues](https://github.com/blog/411-github-issue-tracker) would better
     76 suit your needs, and both have APIs if you want to set up a similar
     77 system. But for us here at Viget, who manage all aspects of our projects
     78 through a ticketing system, seeing actionable user feedback in the same
     79 place as the rest of our tasks has been extremely convenient.