remove

Class: slreq.Justification
Package: slreq

Remove justification items

Syntax

count = remove(jt, 'PropertyName', PropertyValue)

Description

count = remove(jt, 'PropertyName', PropertyValue) removes all child justification items belonging to the parent justification jt with additional properties specified by PropertyName and PropertyValue. Returns the number of items removed as count.

Input Arguments

expand all

Parent justification, specified as an slreq.Justification object.

Output Arguments

expand all

Number of justification items removed, returned as a double.

Examples

Remove Justification Items

% Load a requirement set file
rs = slreq.load('C:\MATLAB\My_Requirements_Set_1.slreqx');

% Find all justification objects in the requirement set
myJustifications = find(rs, 'Type', 'Justification')

myJustifications = 

  1×10 Justification array with properties:

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

% Remove all justification objects that were created by Jane Doe
count = remove(myJustifications, 'CreatedBy', 'Jane Doe')

count = 
  
  5

See Also

Introduced in R2018b