Share this page

# 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
--- | ---
LockObject | Locks the object. Returns true if the object has been changed on the server. Syntax: `LockObject()` 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: does not exist. is locked by another user. is locked by the same user in a different session.
Mail | Mails a list of items. Syntax:`Mail(SendTo, SendCc, SendBcc, Option, Subject, Priority, Comment)` Parameters: sendTo. A string that represents the To recipients. Specify recipients by user names or email addresses, separated by a comma or a semi-colon. sendCc. Optional. A string that represents is the Cc recipients. Specify recipients by user names or email addresses, separated by a comma or a semi-colon. sendBcc. Optional. A string that represents is the Bcc recipients. Specify recipients by user names or email addresses, separated by a comma or a semi-colon. option. Optional. A number that represents which content to include in the email. Valid values can be any of the following, separated by "`|`". 1: TDMAIL_ATTACHMENT. Include the entity's attachments. 2: TDMAIL_HISTORY. Include the entity's history. 4: TDMAIL_TEXT. Send mail as plain test. 8: TDMAIL_DES_STEP. Include design steps. 16: TDMAIL_COVER_TEST. Include test coverage. Applies only to requirements. 64: TDMAIL_COMMENT_AS_BODY. Use the Comment argument of the Mail method as the message body. Used by UI when sending custom e-mail. 4096: TDMAIL_RUN_STEP. Include run steps. 8192: TDMAIL_RUNS. Include run steps of most recent run. 16384: TDMAIL_SEND_TO_OWNER_ON_ASYNC_FAIL. Indicates that if message sent in ASYNC mode and failed, it will be re-sent to sender. 32768: TDMAIL_ATTACHMENT_DES_STEP. Include attachments of design steps. subject.Optional. A string that represents is the mail subject. priority. Optional. A number that represents the importance level of the sent mail. Valid values include: 1. High mail importance. 5. Low mail importance. 3. Normal mail importance. comment. A string that represents the comment on the sent email.
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.
UnLockObject | Unlocks the object. Syntax: `UnLockObject()`

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: `Bug.AssignedTo`
Attachments | R | Object | The AttachmentFactory object for the defect. See AttachmentFactory object. Syntax: `Bug.Attachments`
AutoPost | R/W | Boolean | If true, the database is updated immediately when the field value changes. Syntax: `Bug.AutoPost`
AutoUnlock | R/W | Boolean | Indicates whether to make the item changeable to other users automatically after a Refresh or Post. Syntax: `Bug.AutoUnlock`
BugLinkFactory | R | Object | The bug link factory that manages the links of the current defect to its associated defects. Syntax: `Bug.BugLinkFactory`
DetectedBy | R/W | String | The name of the user who detected the defect. Syntax: `Bug.DetectedBy`
Field | R/W | Any | The value of the specified field. Syntax: `Bug.Field[fieldName]` Parameter: fieldName. A string that represents the name of the field in the project database. Use all upper case.
FieldMultiValue | R/W | Object | The MultiValue object of the specified field. See MultiValue object. Syntax: `Bug.FieldMultiValue[fieldName]` Parameter: fieldName. A string that represents the name of the field in the project database. Use all upper case.
HasAttachment | R | Boolean | Checks if the defect has one or more attachments. Syntax: `Bug.HasAttachment`
HasLinkage | R | Boolean | Checks if the current defect has at least one associated Bug. Syntax: `Bug.HasLinkage`
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: `Bug.HasOtherLinkage`
ID | R | Number | The item ID. Syntax: `Bug.ID`
IsLocked | R | Boolean | Checks if defect is locked for editing. Syntax: `Bug.IsLocked` 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: `Bug.LinkFactory`
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: `Bug.Modified`
Priority | R/W | String | The defect priority. Syntax: `Bug.Priority`
Project | R/W | String | The testing project to which the defect belongs. Syntax: `Bug.Project`
Status | R/W | String | The defect status. Syntax: `Bug.Status`
SubjectId | R | Long | The ID of the Subject field. Syntax: `Bug.SubjectId`
Summary | R/W | String | A short description of the defect. Syntax: `Bug.Summary`
TypeName | R | String | The field's type. Syntax: `Bug.TypeName`
Virtual | R | Boolean | Checks if this is a virtual item, that is, an item that does not have a corresponding database record. Syntax: `Bug.Virtual`

Example

Example: Get and set defect properties

Example: Reject a defect and convert it to a requirement

Example: Create links between defects

Back to top

https://admhelp.microfocus.com Application Quality Management 8942
Tips to improve your search results... OpenText™ Application Quality Management Help Center OpenText™ Application Quality Management Help Center OpenText™ Application Quality Management Help 26.1 All View Local Help Center View Online Help Center Version: