Main Content

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.getChangeInformation and 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:

  1. 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:

    slreq.editor
  2. Open a requirement set.

  3. 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 Browser in your Simulink model. In the Apps tab, click Requirements Manager. In the Requirements Perspective, right-click an item in the Requirements Browser 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 slreq.clear.

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.

Note

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 Resolve Links.

In the Requirements Editor, click Show Links. The red highlighting indicates links with changes.

The Requirements Editor shows highlighted links which indicates change issues.

Requirements Toolbox stores the timestamp and revision for linked items in the link metadata. When you make changes to a linked item, Requirements Toolbox compares the item revision stored in the link metadata with the revision in the current version of the source or destination artifact, and then indicates a change issue. To view the change issue, select a link, then expand Change Information in the right pane. For more information on linkable items and link sources and destinations, see Create and Store Links.

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.

The Change Information in the right pane shows the revision information for the link source and destination.

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:

  1. In the Requirements Editor, click Show Links.

  2. Select the link.

  3. In the right pane, under Comments, click Add Comment.

See Also

|

Related Topics