NAME

Testopia::Webservice::Build

EXTENDS

Bugzilla::Webservice

DESCRIPTION

Provides methods for automated scripts to manipulate Testopia Builds. It is important that you read the documentation for Bugzilla::WebService as this documentation assumes you are familiar with XMLRPC from Bugzilla.

NOTE: In most cases where and id is required, a name attribute can be used instead provided it is unique. For example, Build.get({id => integer}) can substitute Build.get({name => string})

METHODS

check_build
 Description: Looks up and returns a build by name.

 Params:      $name - String: name of the build.
              $product - Integer/String
                         Integer: product_id of the product in the Database
                         String: Product name

 Returns:     Hash: Matching Build object hash or error if not found.
create
 Description: Creates a new build object and stores it in the database

 Params:      $values - Hash: A reference to a hash with keys and values  
              matching the fields of the build to be created. 
  +-------------+----------------+-----------+------------------------------------+
  | Field       | Type           | Null      | Description                        |
  +-------------+----------------+-----------+------------------------------------+
  | product     | Integer/String | Required  | ID or Name of product              |
  | name        | String         | Required  |                                    |
  | milestone   | String         | Optional  | Defaults to product's default MS   |
  | description | String         | Optional  |                                    |
  | isactive    | Boolean        | Optional  | Defaults to True (1)               |
  +-------------+----------------+-----------+------------------------------------+

 Returns:     The newly created object hash.
get
 Description: Used to load an existing build from the database.

 Params:      $id - An integer representing the ID in the database

 Returns:     A blessed Bugzilla::Extension::Testopia::Build object hash
get_caseruns
 Description: Returns the list of case-runs that this Build is used in.

 Params:      $id -  Integer: Build ID.

 Returns:     Array: List of case-run object hashes.
get_runs
 Description: Returns the list of runs that this Build is used in.

 Params:      $id -  Integer: Build ID.

 Returns:     Array: List of run object hashes.
update
 Description: Updates the fields of the selected build or builds.

 Params:      $values - Hash of keys matching Build fields and the new values 
              to set each field to.

              The id field is used to lookup the build and is read only.
                        +--------------+----------------+
                        | Field        | Type           |
                        +--------------+----------------+
                        | id (readonly)| Integer        |
                        | name         | String         |
                        | milestone    | String         |
                        | description  | String         |
                        | isactive     | Boolean        |
                        +--------------+----------------+

 Returns:     Hash: The updated Build object hash.

SEE ALSO

Bugzilla::Webservice

AUTHOR

Greg Hendricks <ghendricks@novell.com>