Req object
A Req object represents a requirement.
You get a Req object from a ReqFactory object.
Public methods
This object supports the following methods.
Method | Description |
---|---|
AddCoverage |
Assigns a test to cover the current requirement. Syntax: Parameters:
|
AddCoverageEx |
Assigns all tests in the specified test folder to cover the current requirement. Syntax: Parameters:
|
GetCoverageTestConfigs |
Returns the list of test configurations that cover the current requirement and, optionally, cover its children that match the requirement filter. Syntax: Parameters:
|
GetCoverageTestConfigsByTestIds |
Returns the list of test configurations that cover the current requirement with filtered tests, and optionally, cover its descendents that match the requirement filter. Syntax: Parameters:
|
GetCoverageTestsByReqFilter |
Returns the list of tests that cover the current requirement and, optionally, cover its children that match the requirement filter. Syntax: Parameters:
|
GetCoverList |
Gets a list of the tests that cover this requirement. Syntax: Parameters:
|
GetCoverListByFilter |
Gets the list of all tests that cover the current requirement and match the filter. Syntax: Parameters:
|
LockObject |
Locks the object. Returns True if the object has been changed on the server. For details, see LockObject. |
Mails a list of items. For details, see Mail. |
|
Move |
Moves a requirement to be a child of a specified father in the requirements tree. Syntax: Parameters:
In addition to moving the requirement, the Move property also unlocks the requirement if it is set to auto-unlock. |
PopulateTargetCycleToChildren |
Assigns the target cycle of the requirement as the target cycle of all child requirements, recursively down the folder tree. Syntax: |
PopulateTargetReleaseToChildren |
Assigns the target release of the requirement as the target release of all child requirements, recursively down the folder tree. Syntax: |
Post |
Posts all changed values into database. For details, see Post. |
Refresh |
Reads saved values, overwriting values in memory. For details, see Refresh. |
RemoveCoverage |
Removes a test from the list of tests that cover this requirement. Syntax: Parameters:
|
Undo |
Undoes changes to field values that have not been posted. For details, see Undo. |
UnLockObject |
Unlocks the object. For details, see UnLockObject. |
Public properties
This object supports the following properties.
Property | R/W | Type | Description |
---|---|---|---|
Attachments |
R | Object |
The attachment factory for the object. See AttachmentFactory object. |
Author |
R/W | String |
The name of the requirement author. |
AutoPost |
R/W | Boolean |
If true, the database is updated immediately when the field value changes. |
AutoUnlock |
R/W | Boolean |
Indicates whether to make the item changeable to other users automatically after a Refresh or Post. |
Comment |
R/W | String |
The comment associated with this requirement. |
Count |
R | Number |
The number of direct children. |
Field |
R/W | Any |
The value of the specified field. Syntax: where fieldName is the name of the field in the project database. Use all upper case. An attempt to get or set the value of a field not applicable to requirements of this type causes an exception. |
FieldMultiValue |
R/W | Object |
The MultiValue object of the specified field. See MultiValue object. Syntax: where fieldName is the name of the field in the project database. Use all upper case. |
HasAttachment |
R | Boolean |
Checks if the object has one or more attachments. |
HasCoverage |
R | Boolean |
The requirement is covered by at least one test. |
HasLinkage |
R | Boolean |
Checks if the current object has at least one associated Bug. |
HasRichContent |
R | Boolean |
Checks if the object has rich content. |
ID |
R | Number |
The item ID. |
IsLocked |
R | Boolean |
Checks if object is locked for editing. 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. |
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. |
Name |
R/W | String |
The Requirement name as seen in the tree. |
ParentId |
R/W | Number |
The Requirement's parent ID. Set this property to place the requirement under another requirement in the hierarchy. The default is -1, indicating a top-level requirement. |
Priority |
R/W | String |
The requirement priority. |
Product |
R/W | String |
The product name for which the requirement is set. |
ReqCoverageFactory | R | Object | Gets a ReqCoverage factory object. See ReqCoverageFactory object. |
RequirementType | R | Object | Gets the requirement types. See ReqType object. |
Reviewed |
R/W | String |
The review status. The review status can be any value configured in the project. Typical examples are Changed, Not Reviewed, and Reviewed. |
RnDEstimatedEffortInHours |
R/W | Number |
The R&D effort. |
Status |
R | String |
The status of the tests that cover this requirement. The statuses of the covering tests are: Failed, No Run, Not Completed, or Passed. If no tests cover this requirement, the value is Not Covered. It can also be any custom status defined by your project admin. |
Type | R/W | String | The name of the requirement type. |
TypeId |
R/W | String |
The requirement's type ID. |
TypeName |
R | String |
The field's type. |
Virtual |
R | Boolean |
Checks if this is a virtual item, that is, an item that does not have a corresponding database record. |
Example