Main Content

slreq.Justification Class

Namespace: slreq

Requirement justifications

Description

Use slreq.Justification objects to work with requirements that you exclude from the implementation and verification status metrics roll-up for your requirements sets. Justify a requirement by creating an outgoing link from the slreq.Justification object to the requirement and setting the link type to Implement or Verify.

Creation

jst = slreq.find(rs, 'Type', 'Justification', 'PropertyName', PropertyValue) finds and returns an slreq.Justification object jst in the requirement set rs with additional properties specified by PropertyName and PropertyValue.

jst = add(jt, 'PropertyName', PropertyValue) adds a child justification jst to the parent justification jt with additional properties specified by PropertyName and PropertyValue.

Input Arguments

expand all

Requirement set, specified as an slreq.ReqSet object.

Justification, specified as an slreq.Justification object.

Output Arguments

expand all

Justification, returned as an slreq.Justification object.

Properties

expand all

Custom ID of the justification, returned as a character vector. You cannot use spaces and '#' in custom IDs.

Attributes:

GetAccess
public
SetAccess
public

Justification summary text, specified as a one-line, plain text character vector.

Attributes:

GetAccess
public
SetAccess
public

Justification description text, specified as a multiline character vector.

Attributes:

GetAccess
public
SetAccess
public

Justification keywords, specified as a character array.

Attributes:

GetAccess
public
SetAccess
public

Justification rationale text, specified as a multiline character vector.

Attributes:

GetAccess
public
SetAccess
public

The date on which the justification 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 justification.

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 justification when it creates the numbered hierarchy list. However, the justification 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 justification.

Attributes:

GetAccess
public
SetAccess
private

Justification revision number, returned as a scalar. When you make changes to the justification 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 a change to the justification.

For more information on requirement set revision, see slreq.ReqSet.

Attributes:

GetAccess
public
SetAccess
private

The date on which the justification 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 justification, specified as a structure.

Attributes:

GetAccess
public
SetAccess
private

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

Attributes:

GetAccess
public
SetAccess
private

Methods

addAdd child justification
addCommentAdd comments to justifications
childrenFind children justifications
copyCopy and paste justification
demoteDemote justifications
findFind children of parent justification
getAttributeGet justification attributes
isFilteredInCheck filtered justifications
isHierarchicalCheck if justification is hierarchical
moveMove justification in hierarchy
moveDownMove justification down in hierarchy
moveUpMove justification up in hierarchy
outLinksGet outgoing links for justifications
parentFind parent item of justification
promotePromote justifications
remove Remove justification items
reqSet Return parent requirement set
setAttributeSet justification attributes
setHierarchicalChange hierarchical justification status

Examples

collapse all

This example shows how to add a child justification under a justification.

Load a requirement set called myReqSet.

rs = slreq.load("myReqSet");

Find justification objects in the requirement set.

myJustifications = find(rs,"Type","Justification")
myJustifications = 

  1×2 Justification array with properties:

    Id
    Summary
    Description
    Keywords
    Rationale
    CreatedOn
    CreatedBy
    ModifiedBy
    SID
    FileRevision
    ModifiedOn
    Dirty
    Comments

Add a child justification to the first justification in the array.

myChildJustification = add(myJustifications(1),"Id","2.1",...
"Summary","New Child Justification")
myChildJustification = 

  Justification with properties:

              Id: '2.1'
         Summary: 'New Child Justification'
     Description: ''
        Keywords: [0×0 char]
       Rationale: ''
       CreatedOn: 25-Aug-2017 14:37:29
       CreatedBy: 'Jane Doe'
      ModifiedBy: 'John Doe'
             SID: 73
    FileRevision: 1
      ModifiedOn: 26-Aug-2017 17:30:20
           Dirty: 0
        Comments: [0×0 struct]

Version History

Introduced in R2018b