Class: Rubyzilla::Product

Inherits:
Object
  • Object
show all
Defined in:
lib/taskmapper-bugzilla.rb

Instance Method Summary collapse

Instance Method Details

#bugs(attributes = {}) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/taskmapper-bugzilla.rb', line 5

def bugs(attributes = {})
  if attributes.empty?
    attributes.merge!(:last_change_time => Time.now-30*24*60*60)
  end
  attributes.merge!(:product => self.name, :limit => 100)
  result = Bugzilla.server.call("Bug.search", attributes)
  result["bugs"].collect { |bug| Bug.new bug["id"] }
end