Created On:  20 October 2011

Problem:

A Document Factory2 template makes use of the $DIFF function to show the difference between two baselines. But when run, the $DIFF function doesn't seem to report any difference even though there is apparent differences between the two baselines defined in the template. Why is it so?

To understand the problem, we need to know the scenario in greater details. This particular scenario has three baselines:

- Baseline1
- Baseline2
- Current Baseline

The requirements in Baseline2 and Current Baseline are exactly the same whereas the requirements in Baseline1 are different from Baseline2.

We are trying to generate a Document Factory2 (DF2) report in .xml format using the DIFF function ($DIFF{Baseline1-Baseline2}) to see the differences between Baseline1 and Baseline2. However, the DIFF function does not show any difference and return the message “No Difference Found”.

Below is a screenshot showing the way we run DF2:

1. Launch CaliberRM Win32 client.

2. Click on a requirement.

3. Select Document Factory from the Tools menu.

On running DocFactory, we are prompted with a selection as illustrated in the screenshot below. We selected 'Yes' [to report on selected requirements (and their children)] and DocFactory2 continues with its processing. Note that the Current baseline is selected in the Baseline drop-down box.



3. DocFactory2 subsequently responded with the following prompt, indicating that there is no difference found between two baselines.

Resolution:

The reason why DF2 does not show any difference is because of the way Document Factory is being run. When the DF2 is launched from the Win32 client with a requirement or requirement type selected, the following dialog is presented:



Depending on your selection in this prompt, the Document Factory output varies.

1. If “No” is clicked in the above dialog, the two baselines specified by the DIFF function in the DF2 template are used for comparing the Requirements. In other words, neither the baseline nor the requirement selection in the Win32 client impacts the resulting DF2 report. Consequently, you can expect the output to show the difference between the two baselines specified in the template.

2. If “Yes” is clicked in the dialog, then the baseline selected in the Win32 client is going to replace the first baseline parameter in the DIFF function, and the comparison will be done between the baseline selected in the client and the baseline identified by the second parameter in the DIFF function.

In this scenario, since "Yes" is selected, Current Baseline and Baseline2 are used for comparison by the DIFF function. As the contents of Current Baseline and Baseline2 are exactly the same, DF2 does not report any difference. 

To conclude, while running Document Factory with a Requirement selected in the Requirement tree, please click 'No' so that $DIFF function can make use of the baselines specified in the template for comparison.

You can also run Document Factory using one of the methods below to see the difference between Baseline1 and Baseline2:

1) Run DF2 from Start menu (Start -> All Programs -> Borland CaliberRM -> Document Factory).
2) If you are running DF2 from Win32 client, ensure that you do not select any Requirement or Requirement Type. In other words, the Project should be selected.

If you need to generate the report for a requirement or requirement type and their child requirements, then you have to select the appropriate baseline through the Baseline drop-down box prior to running the report. To illustrate, in the given scenario, you should select Baseline1 to view the requirement in Baseline 1 prior to running DF2 on the selected requirement or requirement type.
Incident #2533673