Compare Modules
Description of GUI and options
Start Menu Path: Module Menu / Configuration Mgt / Compare Modules
Function:
The Compare Modules tool allows the user to insert a DXL layout column in the view of the current module that shows the comparison results of the current module with another module or baseline. Additionally, it lets you view the differences between the module attribute values of two modules.

The options have the following meaning:
- Method
This radio box allows the user to select how the objects of the two modules shall be matched (see also Object Matching explained in the concepts section )
- Compare by Link
Select this option to compare two modules that are linked 1:1, e.g. like when created using copy and link or after using the comparison wizard.
- Compare by Attribute
Select this option to compare two modules that share a common unique identifier, e.g. if one module has the Object Identifier of the other module stored in a separate attribute. This scenario is common for data exchange.
- Compare with Baseline
Select this option to compare the current module with another baseline of that same module.
Note that this function is a shortcut for "Compare by Attribute" when used on the same module and using "Absolute Number" as a match Attribute.
- Compare with Branch
Select this option to compare the current module with a parallel module of another branch.
- Target
The Target field shows the module that will be used for comparison. Using the "Select Target Button" the user can choose (depending on the setting of "Method"):
- A module and a baseline if the "Compare by Link" or "Compare by Attribute" method is selected
- A baseline if the "Compare with Baseline" method is selected
- A branch (project) if the "Compare with Branch" method is selected.
- Match by Common Attribute Options
This section is active when the "Compare by Attribute" method is active and lets the user choose the two attributes, that shall be used for matching the objects.
- Comparison Settings
In this section, the attributes that shall be considered in the comparison column can be selected. Note that you can insert columns for each attribute separately (which can be beneficial for filtering purposes) as well as showing all differences in the same column. The attribute list view shows only the attributes that exist in both modules. This setting only takes effect if the option "Show Attribute Differences" is selected.
- Unselect All - will select or unselect all checkboxes in the attribute list view.
- Select Common - will select the common attributes in the attribute list view. The common attributes will be made configurable in the next releases so that customers can have a meaningful preselection of relevant attributes for comparison that fits to their data model.
- Show Structural Differences - selects if object movements shall be considered for comparison
- Show Link Differences - selects if a link comparison shall be performed
- Show New Deleted Objects - selects if creation / deletion of objects shall be shown in the comparison column.
- Show Deletions / Purged Objects in predecessor - This option is preselected by default and controls if the comparison results for deleted or purged objects shall be shown on the first non-deleted predecessor objects. This is necessary to see all differences in the modules since the DXL Layout column can only show results for existing objects. Note that if this option is turned off, soft deleted objects will show a result if they are displayed using the view configuration "Show Deleted Objects". Purged objects will not show up on the 'after side' if this option is deselected.
- Show Table Differences in predecessor - This option controls if table differences shall be shown in the first non-deleted object before the table. Since a DXL Layout column does not show results for a table, the changes will be not visible when this option is turned off. Note that the results do exist and can be copied to an attribute using the "Copy Layout DXL to attribute" tool, or the column can be converted to a DXL attribute. This way the changes can be made visible inside the table using the default table attribute setting in DOORS, or be filtered.
- Add Comparison Column - This button inserts the comparison column to the module. However, the comparison will not start calculating right away since the dialog will be blocking updating of the view. This way multiple columns can be inserted without having to wait for the calculation. However due to weird behavior of DOORS, if the dialog is moved or a refresh of the module is triggered somehow, DOORS will start calculating the columns even though the dialog is visible. In this case, the user has to wait before he can insert another column.
- Show Module Attribute Differences - Using this button, the user can evaluate the differences between the module attributes of the selected target and the current module. Note the dialog will always show the differences of all common attributes (the attribute list view is only relevant for object attributes).
The Comparison Columns
There are some good-to-know facts about the comparison columns:
- The comparison columns that the tool inserts into the current module are cached DXL layout columns, which means maximum flexibility. Due to the cache, they behave like a DXL attribute and (once calculated) do not impact the performance of the module drastically. Note that since the columns are cached, they will not react on changes of the current module until they are refreshed.
- These columns can be inserted into a baseline or any module that can only be opened in read mode. This makes the comparison totally unintrusive and applicable to any existing module or baseline in the database.
- The columns can show the results from either the "Before" side or the "After" side. In some cases it can make sense to have both modules opened and have a comparison column in both of them to review the changes.
- The columns can be saved in a view. If the module is closed and a view containing a comparison column is opened, then the results will be newly calculated. This way one can always have 'up-to-date' comparison information to a baseline, branch or other module.

Tips for Configuring the comparison
In each configuration activity, the user has the option to select how they want the comparison performed. This provides flexibility as to how the capabilities are applied and enables both usage in conjunction with the branching tools or with legacy databases.
The comparison method must be chosen depending on the target module. There must be a way of matching the objects of the two modules in a unique way. Modules that do not share any common identifier cannot be compared. A compare by content feature is planned but not yet implemented. As a workaround, one can use the "Compare Wizard" of DOORS to let DOORS create a 1:1 links between similar objects. Using these links, the comparison results can be evaluated using the BranchManager compare. Note however that the "Compare Wizard" of DOORS will not yield usable results in all cases.
To filter on the objects that have changes, DOORS allows to specify a filter on the created DXL layout columns. Hint: To filter on non empty column values use the regular expression '.' (without quotes) on the filter dialog, which means it contains at least one character.
Note that the comparison can also be used while performing an Integration or a Quick Merge to gather more information about the changes. Whenever performing compares, a user can add multiple columns with each representing a different comparison configurations. This supports comparing multiple branches at the same time when reviewing possible changes to merge.
In a hierarchical requirement structure, with modules linked to each other, it might be necessary to show the differences of two modules in a module on a lower hierarchy level. In this case it is advisable to copy the differences to an attribute, edit them to remove unimportant differences (like commas changing, formatting changes, etc.) and then use the DOORS Analysis Wizard to show the differences in the lower hierarchy module.
Comparison Refresh
The comparison refresh will update all comparison columns. This is valuable since your module is still editable while viewing the comparison. So as you perform changes you can update the set of comparison statuses to revisit.

Copy Layout DXL to attribute
This little helper tool can be started using the "Copy Layout DXL To Attribute" module menu. It allows copying the contents of any DXL layout colum (not only compare columns!) to an attribute. In the 'Attribute Name' field, the name of an attribute can be entered. The tool will try to create the attribute if it does not exist yet. To not disturb change bars and history, this attribute will be created by default without affecting history, change bars and modification dates. Be careful with global operations on attributes since it can lead to all change bars flipping to 'changed', make all links suspect, etc. Also note that the Copy Layout To Attribute tool will overwrite the contents of an existing attribute.