slreq.Justification class

Package: slreq
Superclasses:

Work with slreq.Justification objects

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.

Construction

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

jst = slreq.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.

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

Justification description text, specified as a multiline character vector.

Justification rationale text, specified as a multiline character vector.

Justification keywords, specified as a character array.

The Session Independent Identifier corresponding to the justification.

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

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

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

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

Justification revision number, specified as a scalar.

Indicates if the justification has unsaved changes. 0 for no unsaved changes and 1 for unsaved changes.

Methods

addAdd child justification
childrenFind children justifications
demoteDemote justifications
findFind justifications
getAttributeGet justification attributes
isHierarchicalCheck if justification is hierarchical
parentFind parent item of justification
promotePromote justifications
remove Remove justification items
reqSet Return parent requirement set
setAttributeSet justification attributes
setHierarchicalChange hierarchical justification status

Examples

% Find justification objects in a requirement set Project_reqs
myJustifications = find(Project_reqs, '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]

Introduced in R2018b