Pages

Friday, February 5, 2010

Sorting of versions shown in the Compare tool, when using MorphX version control, is not correct

When using the Compare tool from an AOT node in a system with MorphX version control enabled, the order of historical versions for the object is not shown as intended.

The Compare tool is intended to show the first version and the twenty latest versions of the object. In this case however you get the twenty first versions. This is because the Compare tool uses the change numbers of the object to figure out the sorting, but the change number with MorphX version control is always 0.

To fix this, make the following change to \Classes\SysTreenodeCompareContext\comparableListTreenode, lines 110-111:

while select item
    order by ChangeNumber desc, Version asc
with
while select item
    order by ChangeNumber desc, Version desc
This is obviously just a quick fix, but will work as intended until Microsoft fixes the bug.

No comments: