Bug object
A Bug object represents a defect.
You get a Bug object from TDConnection.BugFactory.
Public methods
This object supports the following methods.
Method | Description |
---|---|
Locks the object. Returns true if the object has been changed on the server. Syntax: If an object is locked, no other user can change or delete it. LockObject returns True if the object on the server was more recently changed than the local copy when LockObject was called. In this case, the local copy of the object is refreshed before LockObject returns. If the object cannot be locked, an exception is thrown. Some cases of lock failure are if the object:
|
|
Mails a list of items. Syntax: Parameters:
|
|
Post |
Posts all changed values into database. For details, see Post. |
Refresh |
Reads saved values, overwriting values in memory. For details, see Refresh. |
Undo |
Undoes changes to field values that have not been posted. For details, see Undo. |
Unlocks the object. Syntax: |
Public properties
This object supports the following properties.
Property | R/W | Type | Description |
---|---|---|---|
AssignedTo |
R/W | String |
The name of the user to whom the defect is assigned. Syntax: |
Attachments |
R | Object |
The AttachmentFactory object for the defect. See AttachmentFactory object. Syntax: |
AutoPost |
R/W | Boolean |
If true, the database is updated immediately when the field value changes. Syntax: |
AutoUnlock |
R/W | Boolean |
Indicates whether to make the item changeable to other users automatically after a Refresh or Post. Syntax: |
BugLinkFactory |
R | Object |
The bug link factory that manages the links of the current defect to its associated defects. Syntax: |
DetectedBy |
R/W | String |
The name of the user who detected the defect. Syntax: |
Field |
R/W | Any |
The value of the specified field. Syntax: Parameter:
|
FieldMultiValue |
R/W | Object |
The MultiValue object of the specified field. See MultiValue object. Syntax: Parameter:
|
HasAttachment |
R | Boolean |
Checks if the defect has one or more attachments. Syntax: |
HasLinkage |
R | Boolean |
Checks if the current defect has at least one associated Bug. Syntax: |
HasOthersLinkage |
R | Boolean |
Checks if the current defect has at least one associated defect that is not another Bug defect. Defined only for Bug defects. Syntax: |
ID |
R | Number |
The item ID. Syntax: |
IsLocked |
R | Boolean |
Checks if defect is locked for editing. Syntax: IsLocked is set by the LockObject method and is reset by the UnlockObject method. If the object has an AutoUnlock property and the property is set to True, IsLocked is also reset by a Post or Refresh operation. |
LinkFactory |
R | Object |
The link factory of the current defect that enables viewing the links. Defined only for Bug objects. For details, see LinkFactory object. Syntax: |
Modified |
R | Boolean |
Checks if the item has been modified since last refresh or post operation. If true, the field properties on the server side are not up to date. Syntax: |
Priority |
R/W | String |
The defect priority. Syntax: |
Project |
R/W | String |
The testing project to which the defect belongs. Syntax: |
Status |
R/W | String |
The defect status. Syntax: |
SubjectId |
R | Long |
The ID of the Subject field. Syntax: |
Summary |
R/W | String |
A short description of the defect. Syntax: |
TypeName |
R | String |
The field's type. Syntax: |
Virtual |
R | Boolean |
Checks if this is a virtual item, that is, an item that does not have a corresponding database record. Syntax: |
Example
Example: Get and set defect properties
Example: Reject a defect and convert it to a requirement