Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Interface for working with Request Tracker (RT) tickets inspired by ActiveRecord.
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib Parse and set errors on failed ticket create/update
Gemfile Added bundle and rspec 2.8.x
Gemfile.lock Added bundle and rspec 2.8.x
History.txt added attribution to hennk for fixes.
README.rdoc Forgot to save Readme. Fixed spec that was misbehaving
Rakefile removing the 0.9.3 tag from mechanize
roart.gemspec Added bundle and rspec 2.8.x



/       \

by PJ Davis


If you are using Best Practical's Request Tracker (RT) and you need to interact with tickets from other applications, Roart provides an interface that is slightly reminiscent of ActiveRecord.


  • Access RT Tickets through an ActiveRecord like API

  • This has only been tested against RT 3.6. Changes to the REST interface in later versions of RT may break stuff.


  • Create a class to interact with your ticket system

    require 'rubygems'
    require 'roart'
    class Ticket < Roart::Ticket
      connection :server => '', :user => 'myuser', :pass => 'mypass'
  • Search for tickets

    my_tickets = Ticket.find(:all, :queue => 'Scutters', :status => [:new, :open])
    my_tickets.each do |ticket|
      puts ticket.subject
    #-> New John Wayne packages
    #-> Medi-lab training
  • See all info for a ticket

    my_ticket = Ticket.find(:first, :queue => 'Issues', :status => :new)
    ticket.creator #->
    ticket.subject #-> Where is the Bomb?
  • Get history for a ticket

    my_ticket.histories #-> Returns an array of history objects
  • Create a new ticket

    issue = => 'some_queue', :subject => 'This is not working for me') #-> 'ticket/new' #-> 23423
  • Update a ticket

    ticket = Ticket.find(23452)
    ticket.subject #-> "Some Subject for a ticket."
    ticket.subject #-> "Smoke me a kipper, I'll be back for breakfast."
    ticket.subject #->"Smoke me a kipper, I'll be back for breakfast."
  • Comment on a Ticket

    ticket = Ticket.find(23452)
    ticket.comment("This is a lovely Ticket", :time_worked => 45, :cc => ''))


  • mechanize

  • A working RT3 install.


$ gem sources -a
$ sudo gem install pjdavis-roart


        (C) PJ Davis <>

This program is free software; you can redistribute it and/or modify it under
the terms of the WTFPL, Version 2, as
published by Sam Hocevar. See for more details.
Something went wrong with that request. Please try again.