Class: Bugzilla::Product

Inherits:
APITemplate show all
Defined in:
lib/bugzilla/product.rb

Overview

rdoc

Bugzilla::Product

Bugzilla::Product class is to access the Bugzilla::WebService::Product API that allows you to list the available Products and get information about them.

Instance Method Summary collapse

Methods inherited from APITemplate

#initialize, #method_missing

Methods inherited from Skeleton

#initialize, #method_missing

Constructor Details

This class inherits a constructor from Bugzilla::APITemplate

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Bugzilla::APITemplate

Instance Method Details

#accessible_productsObject

rdoc

Bugzilla::Product#accessible_products

Returns Hash table for the products information that the user can search or enter bugs against. the Hash key is the product name and containing a Hash table which contains id, name, description, is_active, default_milestone, has_uncomfirmed, classification, components, versions and milestones. please see www.bugzilla.org/docs/tip/en/html/api/Bugzilla/WebService/Product.html#get for more details.



82
83
84
85
# File 'lib/bugzilla/product.rb', line 82

def accessible_products
  ids = get_accessible_products
  Hash[*get(ids)['products'].map { |x| [x['name'], x] }.flatten]
end

#enterable_productsObject

rdoc

Bugzilla::Product#enterable_products

Returns Hash table for the products information that the user can enter bugs against. the Hash key is the product name and containing a Hash table which contains id, name, description, is_active, default_milestone, has_uncomfirmed, classification, components, versions and milestones. please see www.bugzilla.org/docs/tip/en/html/api/Bugzilla/WebService/Product.html#get for more details.



64
65
66
67
# File 'lib/bugzilla/product.rb', line 64

def enterable_products
  ids = get_enterable_products
  Hash[*get(ids)['products'].map { |x| [x['name'], x] }.flatten]
end

#selectable_productsObject

rdoc

Bugzilla::Product#selectable_products

Returns Hash table for the products information that the user can search on. the Hash key is the product name and containing a Hash table which contains id, name, description, is_active, default_milestone, has_uncomfirmed, classification, components, versions and milestones. please see www.bugzilla.org/docs/tip/en/html/api/Bugzilla/WebService/Product.html#get for more details.



46
47
48
49
# File 'lib/bugzilla/product.rb', line 46

def selectable_products
  ids = get_selectable_products
  Hash[*get(ids)['products'].map { |x| [x['name'], x] }.flatten]
end