BugFactory object

Manage defects, including creating and removing defects.

You get a BugFactory object from TDConnection.BugFactory.

Public methods

This object supports the following methods.

Method Description

AddItem

Creates a new item object.

Syntax: BugFactory.AddItem(null)

Passing null as the argument creates a virtual object, one that does not appear in the project database. After creating the item, use the relevant object properties to fill the object, then use the Post method to save the object in the database.

Mail

Mails a list of items.

For details, see Mail.

NewList

Creates a list of objects according to the specified filter.

Syntax: NewList(filter)

Parameters:

  • filter. A TDFilter.Text string that defines the criteria for filtering items in the factory. If an empty string is passed, the returned list contains all the child items of the current factory object.

RemoveItem

Removes a object from the database. Removal takes place immediately, without a Post.

Syntax: RemoveItem(itemKey)

Parameters:

  • itemKey. A number that represents the defect ID, a reference to the Bug object, or an array of defect IDs.

Item

Gets an object managed by the factory by its key.

Syntax: Item(itemKey)

Parameters:

  • itemKey. A number that represents the object ID.

Public properties

This object supports the following properties.

Property R/W Type Description

Fields

R List

The list of all available fields for the entity managed by the factory.

Syntax: BugFactory.Fields

Filter

R Object

The TDFilter object for the factory. See TDFilter object.

Syntax: BugFactory.Filter

Example:

Example: Create links between defects

Back to top