LinkFactory object

Manage Link objects.

You can get a LinkFactory reference from either of the following:

Public methods

This object supports the following methods.

Method Description

AddItem

Creates a new item object.

Syntax: AddItem(itemData)

Parameters:

  • itemData. It accepts the following options.

    • A number that presents the ID of the Bug object that will be the TargetEntity of the new link.

    • A Bug object.

    • A list of Bug.IDs that will be the targets.

    • 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.

Return: A Link object.

NewList

Creates a list of objects according to the specified filter.

For details, see NewList.

RemoveItem

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

For details, see RemoveItem.

Item

Gets an object managed by the factory by its key.

For details, see Item.

Public properties

This object supports the following properties.

Method R/W Type Description

Fields

R List

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

Syntax: LinkFactory.Fields

Filter

R Object

The TDFilter object for the factory. See TDFilter object.

Syntax: LinkFactory.Filter

Example:

Example: Create links between defects

Back to top