Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-14189

Be able to revert/restore batch operations

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • 9.2
    • Old Core
    • None
    • Unknown

    Description

      Building on XWIKI-13164, which handles restoring batch delete operations, we would like to have a more generic feature that allows reverting a batch operation for other types of operations like renaming or copying.

      The main point is to extend the usage of the batchId that will be introduced in XWIKI-13164 and add it to the document history as well. This will allow us to use the same batchId of a rename operation (for example) and save it in both the RecycleBin entries of the deleted documents (sources) but also in the new History entries of the new locations (destinations). When implementing the revert functionality for the rename operation, we will be able to identify both the original deleted documents and the previous versions of the new locations by matching the same "operation ID", i.e. batchId.

      To have an overview on the available operations for reverting (and the existing IDs), a dedicated database table (e.g. XWikiOperations) would be useful that would store the following information:

      • id, batch ID that will match History and RecycleBin entries allowing us to restore the data
      • type, operation type, e.g. rename/delete/copy/etc.
      • request, serialized operation request for better describing the operation and its intent

      The main challenge would include the fact that restoring a document from the RecycleBin also restores its history and overwrites what existed before it. Also, both document history and RecycleBin entries can be individually deleted, so any operation that we might want to revert has the risk of being incomplete, when some of the batch's elements were already either partially restored or deleted/destroyed by manual or other operations.

      This issue was discussed with and mainly proposed by tmortagne.

      Attachments

        Activity

          People

            Unassigned Unassigned
            enygma Eduard Moraru
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: