Associate project requirements with source files

You can implement requirements tracing with hyperlinks, which associate pairs of VOB objects. The association should be at the version level rather than at the branch or element level. Each version of a source code module must be associated with a particular version of a related design document. For example, the project manager creates a hyperlink type named DesignDoc, which is used to associate source code with design documents.

cleartool mkhltype –c "associate code with design docs" \
DesignDoc@/vobs/dev DesignDoc@/vobs/design 
Created hyperlink type "DesignDoc". 
Created hyperlink type "DesignDoc".

The hyperlink inheritance feature enables the implementation of requirements tracing:

  • When the source module, hello.c, and the design document, hello_dsn.doc, are updated, you create a new hyperlink connecting the two updated versions:
    cleartool mkhlink -c "source doc" DesignDoc hello.c /vobs/design/hello_dsn.doc 
    Created hyperlink "DesignDoc@90@/vobs/dev".
  • When either the source module or the design document incorporates a minor update, no hyperlink-level change is required. The new version inherits the hyperlink connection of its predecessor.
    cleartool checkin -c "fix bug" hello.c 
    Checked in "hello.c" version "/main/2".

    To list the inherited hyperlink, use the –ihlink option to the describe command.

    On Linux and the UNIX system

    version that inherits hyperlink->
    cleartool describe –ihlink DesignDoc hello.c@@/main/2
    hello.c@@/main/2 
      Inherited hyperlinks: DesignDoc@90@/vobs/dev
    version to which -> hyperlink is explicitly attached
    /vobs/dev/hello.c@@/main/1 -> 
    /vobs/doc/hello_dsn.doc@@/main/1

    On the Windows® system

    version that inherits hyperlink->
    cleartool describe –ihlink DesignDoc hello.c@@\main\2
    hello.c@@\main\2
      Inherited hyperlinks: DesignDoc@90@\dev
    version to which -> hyperlink is explicitly attached
        \dev\hello.c@@\main\1 ->
        \doc\hello_dsn.doc@@\main\1
  • When either the source module or the design document incorporates a significant update, which renders the connection invalid, you create a null-ended hyperlink to sever the connection.
    cleartool mkhlink -c "sever connection to design doc" DesignDoc hello.c
    Created hyperlink "DesignDoc@94@/vobs/dev".
The following figure illustrates the hyperlinks that connect the source file to the design document.
Figure 1: Requirements tracing

There are two parallel version trees for two elements hello.c and hello_dsn.c.