This article provides a simple configuration example of how to include a change log of items, that you define as being subject to change control, in a report or document.


There are three types of changes handled by the change log - new, updated and deleted. A change is considered to have occurred between two consecutive versions. So, to obtain results, there must be a previous version to compare to.


The types of changes that you can specify are: 

new: items that have been added since the previous version

updated: items that have been updated since the previous version

deleted:  items that have been deleted since the previous version


Example Data 

Version 2 of the "Adaptive cruise control" structure has been released.


A new version (version 3) has been created. In version 3, "No drag" has been removed. "Maintain cruise speed" has been updated (it is now version 3), and "Override cruise" has been added. 


These changes between version 2 and version 3 of "Adaptive cruise control"  can be seen in the Versions view.


Example Configuration

<Report>
    <ForEach select="/IBRA">
        <AddToChangeLog/>
    </ForEach>

    <Section title="Change Log - updated items">
        <ForEachItemInChangeLog type="updated">
            <Text>#{Name} </Text>
        </ForEachItemInChangeLog>
    </Section> 

    <Section title="Change Log - new items">
        <ForEachItemInChangeLog type="new">
            <Text>#{Name} </Text>
        </ForEachItemInChangeLog>
    </Section>

    <Section title="Change Log - deleted items">
        <ForEachItemInChangeLog type="deleted">
            <Text>#{Name} </Text>
        </ForEachItemInChangeLog>
    </Section>
</Report>

The two key parts of the configuration are to define what should be added to the change log, and to define how the information will be presented. 


<AddToChangeLog/> defines which objects should be considered as subject for being included in the change log. 


<ForEachItemInChangeLog> defines what information to include for the items that are added to the change log. Valid type attribute values are new, updated, and deleted.


Note: If no type is indicated, all items that are subject to the change control will be listed.


Example Result

All parts of type "IBRA" are subject to be included in the change log. Other parts will not be shown in the change log. If any item with part SID="IBRA" has changed, been added or been deleted since the previous version, it will be listed in the change log. Changes to items with other part types are not listed in the change log.


What's Next?

Learn more about the available change log tags and options in the SystemWeaver Script Language Reference Manual the application Help.