Comparing Drafts

The Compare button on the Draft Home Page allows two Drafts to be compared for differences. Unlike a Standards Compliance Compare this comparison does not take into account allowed changes, it simply compares differences between objects in the Draft. This comparison also examines changes to Matrices and Folders which are not part of Standards Compliance Comparisons because Folder/Matrix objects are usually very different between a Library and a Project.

To perform a comparison, select a Draft to compare the current Draft against. Normally these comparisons are between Drafts in the same Project but the current Draft can be compared against any other Draft that the user has access to.

The Draft Comparison detects these categories of changes:

  • Object exists in both Drafts but has some differences

  • Object exists in both Drafts, the object itself is the same in both Drafts, but there are differences in Related Objects (see below)

  • Object exists in current Draft but not in the comparison Draft

  • Object exists in the comparison Draft but not in the current Draft

  • Object exists in both Drafts but only Ordinal has changed (for Folder and Form objects)

You may also include objects which are 'Matched', i.e. identical, by clicking the 'Include Matched' button.

You may choose to 'Ignore Custom Function comments and whitespace'. Custom Functions which only have differences in comments or whitespace will be marked as 'Matched' not as 'Different'.

For example:

/* HEADER
Description
*/

    return true;

// Comment

will match with:

return true;

However additional spaces in the middle of code will still be marked as different. These will always be different:

return true;
return    true;

The comparison will include checking 'Related Objects' for Edit Checks, Derivations and Test Cases:

  • Edit Check Related Objects are Custom Functions and Fields in Check steps or actions

  • Derivation Related Objects are Custom Functions in Derivation steps and Fields in Derivation steps or targets

  • Test Case Related Objects are Edit Checks, Derivations and Custom Functions which are marked as related in the Test Case content.

When comparing Related Objects, a Field will be different if:

  • it is active in one Draft and not in the other

  • its Form is active in one Draft and not in the other

  • it exists in the source Draft but not in the target

For Folders and Forms, the addition or removal of a Folder or Form will cause renumbering of Ordinals. These changes may not be significant and so are shown as a separate change type where only the Ordinal of the object has changed. For example, if the Ordinal of a Form was changed but also the Draft Form Name then this will be shown as a Difference between the Objects. If only the Ordinal of a Form is changed then this is shown as an Ordinal change only.

Differences are shown in a table along with when each object was last changed and which user made the change. Where there are differences between Objects in the Drafts these can be explored further by selecting the Compare button for those Objects. This shows the detail view of differences between the Objects.

Important

Objects in Standard Drafts have additional properties such as allowed changes, can add and can delete child objects (such as Fields in Forms and Entries in Data and Unit Dictionaries. These standards compliance properties are not compared when using this function.

Renaming DraftA and DraftB in Comparisons

Normally when two Drafts are compared they are named "A" and "B" in the comparison listing and users will see buttons to open the "A" object or the "B" object. Sometimes it is useful to be able to change these short names to something more specific to the task being performed. For example, you might be comparing a "Before" Draft against an "After" Draft or a "Source" and "Target".

The Draft comparison dialog provides a function to change these names. Enter the new source and/or target name and click the refresh icon next to the source or target name. The page will refresh and the references to A or B will be changed to your selected values.

Change the A and B references on the Draft Compare Page

Copying objects missing in one Draft to Another

The Draft Compare page allows objects which exist in one draft but not another to be copied between drafts in bulk. For example, if DraftA contains several custom functions which do not exist in DraftB then these objects can be selected in the compare list and the A -> B button can be used to initiate a copy from DraftA to DraftB.

The objects in DraftA (the source Draft) are not changed as part of this copy. Objects copied from DraftA to DraftB will have their Copy Source set to DraftA.

This function can be used to copy large numbers of objects between drafts in bulk.

Note

When copying Matrices, only Folder/Form combinations which exist in the Target Draft or which ae included as part of the copy operation are included are included in Matrices copied to the Target. Copying a Matrix does not automatically select and copy over associated Forms and Folders.