class Lighthouse::Ticket
Find tickets
Lighthouse::Ticket.find(:all, :params => { :project_id => 44 }) Lighthouse::Ticket.find(:all, :params => { :project_id => 44, :q => "state:closed tagged:committed" }) project = Lighthouse::Project.find(44) project.tickets project.tickets(:q => "state:closed tagged:committed")
Creating a Ticket
ticket = Lighthouse::Ticket.new(:project_id => 44) ticket.title = 'asdf' ... ticket.tags << 'ruby' << 'rails' << '@high' ticket.save
Updating a Ticket
ticket = Lighthouse::Ticket.find(20, :params => { :project_id => 44 }) ticket.state = 'resolved' ticket.tags.delete '@high' ticket.save
Attributes
Public Instance Methods
body()
click to toggle source
# File lib/lighthouse/ticket.rb, line 41 def body attributes['body'] ||= '' end
body=(value)
click to toggle source
# File lib/lighthouse/ticket.rb, line 45 def body=(value) attributes['body'] = value end
body_html()
click to toggle source
# File lib/lighthouse/ticket.rb, line 49 def body_html attributes['body_html'] ||= '' end
body_html=(value)
click to toggle source
# File lib/lighthouse/ticket.rb, line 53 def body_html=(value) attributes['body_html'] = value end
id()
click to toggle source
# File lib/lighthouse/ticket.rb, line 31 def id attributes['number'] ||= nil number end
Private Instance Methods
parse_with_spaces(list)
click to toggle source
taken from Lighthouse Tag code
# File lib/lighthouse/ticket.rb, line 71 def parse_with_spaces(list) tags = [] # first, pull out the quoted tags list.gsub!(/\"(.*?)\"\s*/ ) { tags << $1; "" } # then, get whatever's left tags.concat list.split(/\s/) cleanup_tags(tags) end