Contenido principal

promote

R2026b

Class: slreq.Justification
Namespace: slreq

Promote justifications

Syntax

promote(jt)

Description

promote(jt) promotes the slreq.Justification object jt up one level in the hierarchy.

Input Arguments

expand all

Justification, specified as an slreq.Justification object.

Examples

expand all

Load a requirement set file and find justification objects.

rs = slreq.load("C:\MATLAB\My_Requirements_Set_1.slreqx");

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

  1×20 Justification array with properties:

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

Find the children of the first justification.

jt1 = allJusts(1);
childJusts = children(jt1)
childJusts = 

   1×10 Justification array with properties:

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

Promote the first child of jt1. Then, find the parent of childJusts(1).

promote(childJusts(1));
parentJustification = parent(childJusts(1))
parentJustification = 

  ReqSet with properties:

             Description: ''
                    Name: 'My_Requirements_Set_1'
                Filename: 'C:\MATLAB\My_Requirements_Set_1.slreqx'
                Revision: 81
                   Dirty: 1
    CustomAttributeNames: {}

Version History

Introduced in R2018b

See Also

| |