Reverting Changes to a Tracked Object and Its Tracked Contents

5 minute readData analyticsAutomation

The Change History displays a list of changes in reverse chronological order (from latest to oldest) for tracked entities in objects such as applications, independent microservices, procedures, workflows, workspaces, resources, and project-owned components such as library components. Each row in the Change History or a tracked object is a record of a change made either to the tracked object or to a tracked object owned by the object (directly or indirectly). For example, the Change History of a project would show both changes to the project itself and changes to any tracked object in the project, such as its procedures, the steps for each procedure, or properties belonging to the procedure steps.

Some types of objects (mostly run-time objects such as jobs, because tracking those would be resource-intensive and seldom useful) are not tracked by the Change Tracking feature. For a few types of tracked objects, some of their attributes are not tracked (for example, agents are tracked, but certain attributes of agents that vary frequently in real-time, such as their current status, are not).

Changes to untracked objects, or to untracked attributes of tracked objects, are not shown in the Change History and cannot be reverted. In general, objects that are normally created or changed manually are tracked, and objects that are normally created or modified during automated processing are not, However, depending on your specific usage patterns, this behavior may not be recorded in the Change History, such as when you frequently run jobs that use ectool or API commands to automate the creation of new procedures or steps.

You must have the Read , Modify , and Execute permissions to revert changes in the UI or to access to the revert API function.

Follow these steps to select a tracked object and its tracked entities that you want to revert:

  1. Go to the Change History for the object that you want to revert using one of these methods:

    • Select Track Changes Track changes for the object.

    • From the Automation Platform Home page (https://<cloudbees-flow-server>/commander/), select Change History Change history to go to the "Change History—Search" page and search for the object.

  2. Locate the time period in which you are interested.

    A list of changes for the tracked object appears.

  3. If you decide to revert the changes for an object owned by the tracked object or for an object that owns the tracked object, use one of the methods to view the list of changes for this object:

    • Close the current Change History and navigate to the Change History for the object.

    • Select View Path View path on the top of the current Change History, copy the path, go to the "Change History—Search" page, and search for a suitable addition to or truncation of that path.

  4. Select a row (record) in the Change History corresponding to the earliest of the changes that you want to undo.

    You will be reverting the object and all its tracked contents to their state directly before the selected change was made.

    1. If Revert Revert is enabled, CloudBees CD/RO is capable of reverting the selected changes to the object.

      Go to Step 5.

    2. If the Revert button is still disabled, CloudBees CD/RO is not currently capable of reverting changes to the selected object. This could be due to tracking of this object being disabled and re-enabled, or the Change History feature being disabled and re-enabled. Also, not all types of tracked objects can currently be reverted (and due to mutual consistency requirements in the database format, certain types of objects cannot be reverted).

      If you are unable to revert the selected object, you may still be able to achieve what you need to do one of these ways:

      • Revert the parent object that owns the object you want to revert.

      • Separately revert the individual objects owned by the selected object or even nested partial-reversions-of-reversions, possibly combined with manually reversion (undoing) certain changes.

        Go to Step 3 to search for an owned or owning tracked object.

  5. Before clicking the Revert button, make certain that you know all the changes that will be reverted, and have confirmed that this is what you want to do. (While it is possible to re-revert the changes caused by a mistaken reversion operation, doing so leaves a lot of activity in the Change History.)

    All changes for tracked entities will be reverted, even the ones that you do not see in the Change History because of the timeline and filter settings.
    1. You may need to modify the timeline and filter settings to display all records in the Change History before you verify that all records are changes you want to revert.

    2. Make sure that the end of the timeline is set to Now and that the filters are set to View All Changes.

    3. Look through the entire list of changes from the most recent to the one you have selected, expanding them to see the details if needed, and confirm that you really want to revert all of them.

      If you want to revert some changes but not others, you may be able to achieve what you want to do with some combination of the following methods:
      • Reverting just certain objects owned by the object that you want to revert.

      • Using nested or overlapping sets of reverts of owned objects.

      • Undoing individual changes manually using the CloudBees CD/RO UI.

      • Using nested partial-reverts-of-reverts.

If you fully understand the XML format used for CloudBees CD/RO exports, you can use the export API call to export the past and current states of a part of the object hierarchy, diff and merge them using a suitable tool for diffing and merging XML files, and then re-import the results. Caution is strongly suggested if you are using this approach to revert objects for which CloudBees CD/RO does not currently support reversion, because:

  • There are some places in the CloudBees CD/RO XML data hierarchy where peer objects refer to each other in ways that need to be kept consistent (such as by index of current position in a list).

  • For some types of objects, re-importing them can change their IDs and break references-by-id.

    1. Click the Revert button. Depending on the size of the object and every tracked object it owns, this operation could take some time (as long as exporting a past state of them and then re-importing it).

      If this operation is successful, the object and its tracked entities are reverted to the state at the date and time of the record selected in Step 3. A message appears that the Revert operation was successful.

      If this operation is not successful, the object and its tracked entities are not reverted, and a message appears about the failed operation.