Main Content

slreq.Requirement Class

Namespace: slreq

Work with requirement objects

Description

Instances of slreq.Requirement are Requirement objects that you manage solely inside Requirements Toolbox™ and that do not have a persistent association with artifacts managed by external applications. Requirement objects can exist only within a requirement set.

Creation

req = find(rs, 'PropertyName', PropertyValue) finds and returns a requirement req in the requirement set rs with additional requirement properties specified by PropertyName and PropertyValue.

req = add(rs, 'PropertyName', PropertyValue) adds a requirement req to the requirement set rs with additional requirement properties specified by PropertyName and PropertyValue.

Input Arguments

expand all

Requirement set, specified as an slreq.ReqSet object.

Output Arguments

expand all

Handle to a requirement, returned as an slreq.Requirement object.

Properties

expand all

Requirement type, specified as "Functional", "Informational", "Container", or a string scalar or character vector that specifies a custom requirement type or stereotype. For more information, see Requirement Types.

Attributes:

GetAccess
public
SetAccess
public

Custom ID of the requirement, specified as a string scalar or character vector. You cannot use spaces and '#' in custom IDs.

Attributes:

GetAccess
public
SetAccess
public

Requirement summary text, specified as a string scalar or character vector.

Attributes:

GetAccess
public
SetAccess
public

Requirement description text, specified as a string scalar or character vector.

Attributes:

GetAccess
public
SetAccess
public

Requirement keywords, specified as a string array or cell array of character vectors.

Attributes:

GetAccess
public
SetAccess
public

Requirement rationale text, specified as a string scalar or character vector.

Attributes:

GetAccess
public
SetAccess
public

The date on which the requirement was created, specified as a datetime value. The software populates this property.

Attributes:

GetAccess
public
SetAccess
private

The name of the individual or organization who created the requirement.

Attributes:

GetAccess
public
SetAccess
private

The name of the individual or organization who last modified the requirement.

Attributes:

GetAccess
public
SetAccess
private

Indicates whether the index is enabled (1) or disabled (0), returned as a 1 or 0 of data type logical. If you disable the index, Requirements Toolbox does not count this requirement when it creates the numbered hierarchy list. However, the requirement remains in the same place in the hierarchy.

Attributes:

GetAccess
public
SetAccess
public

User-specified index value, returned as an empty double array or an int32 array. If empty, Requirements Toolbox calculates the Index value. Otherwise, Requirements Toolbox sets the Index property to the specified integer value.

Attributes:

GetAccess
public
SetAccess
public

The Session Independent Identifier corresponding to the requirement, specified as a character vector.

Attributes:

GetAccess
public
SetAccess
private

Requirement revision number, returned as a scalar. When you create a new requirement, the FileRevision property matches the requirement set revision number. When you modify the requirement and save the requirement set, the requirement set revision number increments by one and the FileRevision property updates to match the new requirement set revision number. The FileRevision property updates only when you save changes to the requirement.

Attributes:

GetAccess
public
SetAccess
private

The date on which the requirement was last modified, specified as a datetime value. The software populates this property.

Attributes:

GetAccess
public
SetAccess
private

Indicates if the requirement has unsaved changes (1) or does not have unsaved changes (0).

Attributes:

GetAccess
public
SetAccess
private

The comments that are attached with the requirement, specified as a structure.

Attributes:

GetAccess
public
SetAccess
private

The index of the requirement, specified as a character array.

Attributes:

GetAccess
public
SetAccess
private

Methods

addAdd child requirement
addCommentAdd comments to requirements
childrenFind child requirements of a requirement
copyCopy and paste requirement
demoteDemote requirements
findFind children of parent requirements
getAttributeGet requirement property values
getDescriptionAsText Get requirement description as plain text
getImplementationStatus Query requirement implementation status summary
getRationaleAsText Get requirement rationale as plain text
getVerificationStatus Query requirement verification status summary
inLinksGet incoming links for requirements
isFilteredInCheck filtered requirements
isJustifiedForCheck if requirement is justified
justifyImplementation Justify requirements for implementation
justifyVerification Justify requirements for verification
moveMove requirement in hierarchy
moveDownMove requirement down in hierarchy
moveUpMove requirement up in hierarchy
outLinksGet outgoing links for requirements
parentFind parent item of requirement
promotePromote requirements
removeRemove requirement from requirement set
reqSetReturn parent requirement set
setAttributeSet requirement property values

Examples

collapse all

This example shows how to find a requirement in a requirement set.

Load a requirement set called myReqSet.

rs = slreq.load("myReqSet");

Find a requirement with ID 77 in the requirement set.

req = find(rs,"Type","Requirement","ID","77");
req = 

  Requirement with properties:

             Id: '77'
        Summary: 'Test Spec'
       Keywords: [0×0 char]
    Description: ''
      Rationale: ''
            SID: 80
      CreatedBy: 'John Doe'
      CreatedOn: 05-Oct-2007 16:09:38
     ModifiedBy: 'Jane Doe'
     ModifiedOn: 21-Dec-2016 11:10:05
       Comments: [0×0 struct]

Version History

Introduced in R2018a