Main Content

demote

Class: slreq.Requirement
Package: slreq

Demote requirements

Syntax

deomote(req)

Description

deomote(req) demotes the slreq.Requirement object req one level down in the hierarchy.

Input Arguments

expand all

Requirement specified as an slreq.Requirement object.

Examples

Demote Requirements

% Load a requirements set file and add two new requirements 
rs = slreq.load('C:\MATLAB\My_Requirements_Set_1.slreqx');
req1 = add(rs, 'Id', '5', 'Summary' , 'Additional Requirement'); 
req2 = add(req1, 'Id', '5.1', 'Summary' , 'Child Requirement');

% Demote req2
demote(req2);

% Find the parent of req2
parentReq = parent(req2);

parentReq = 

  ReqSet with properties:

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

Introduced in R2018a