Track Changes to Requirement Links
After you author or import requirements and create links between those requirements and
the design elements. Requirements Toolbox™ can detect when the requirements, Simulink test objects or lines of MATLAB
code change. You can track changes from the Requirements
Editor, and resolve change issues or clear changes that have
no impact on the requirement status. To track and clear
change issues programmatically, see
slreq.clearChangeIssues. You can also review and resolve change issues by
using a traceability matrix. For more information, see Work with Links in the Traceability Matrix.
Enable Change Tracking for Requirement Links
To enable change tracking for requirement links:
Open the Requirements Editor. From your Simulink® model, in the Apps tab, click Requirements Manager. In the Requirements tab, click Requirements Editor. Alternatively, enter this command at the MATLAB® command prompt:
Open a requirement set.
In the View section, click Information > Change Information.
After you enable Change Information, this setting stays enabled even after you close the Requirements Editor.
Alternatively, you can enable change tracking for requirement links from the Requirements pane in your Simulink model. Right-click an item in the Requirements pane and select Change Information.
Run Change Tracking Analysis
Requirements Toolbox does not perform change tracking analysis until you run the analysis. You can run the analysis in the Requirements Editor or Requirements Perspective.
A banner in the Requirements Editor or Requirements Perspective indicates when results are pending. To run the analysis, click Analyze now in the banner. Alternatively, click Refresh in the Requirements Editor or the Refresh button in the Requirements Perspective.
Change tracking analysis continuously runs in the background until you use
Review Changes to Requirements, Test Objects, and MATLAB Code Lines
After you refresh your links change information, you can review the changes to linked items. The Requirements Editor shows a change issue when you:
Change a requirement.
Change a Simulink Test™ test object.
Modify, add, or remove lines of code in MATLAB code files or MATLAB Function blocks.
Requirements Toolbox provides change tracking information for unresolved links only if the linked requirement is valid. For more information on why a link might become unresolved, see Unresolved Links.
In the Requirements Editor, click Show Links. The red highlighting indicates links with changes.
Requirements Toolbox compares the stored timestamp and revision to the current timestamp and revision for the linked artifact. If you change the source or the requirement after the last time you changed it, then the Requirements Editor indicates a change issue. To view the change issue, select a link, then expand Change Information in the right pane.
Resolve Change Issues
You can resolve change issues from the Requirements Editor. If a change has no impact, you can clear the change issue. To clear a change issue, click Show Links, select the link and, in the right pane, under Change Information, click Clear Issue.The link change information updates with the current timestamp and revision for the requirement. If the change issue affects the status of your requirements, you can change the model, the requirements, test cases, or links to resolve the revision discrepancy, and then clear the issue.
To clear change issues for multiple links at the same time, select multiple links by pressing Shift or Ctrl and clicking the links. Right-click one of the selected links and click Clear Issue from the context menu. To clear all change issues for an entire link set, select the link set and, in the right pane, under Change Information, click Clear All. You can also right-click the link set and select Clear All Change Issues from the context menu.
Add Comments to Links
When you resolve change issues, it is good practice to add a comment to the link describing the actions. Each link has a Comments property. When you clear a change issue, a dialog box appears and prompts you to add a comment.
To add an additional comment:
In the Requirements Editor, click Show Links.
Select the link.
In the right pane, under Comments, click Add Comment.