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

New (irrelevant) major versions are generated in the history of a page by the XClassMigratorListener

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 11.3.7
    • Old Core
    • None
    • Unknown

    Description

      When considering documents where the last modification date, and the history are two key elements, it can sometimes reduce XWiki adoption when a tester notices that when a document contains an object of a specific class, and when this class changes, the document containing the object is also updated.

      This is a standard behavior implemented by the XClassMigratorListener, which makes sure that objects in documents are always up to date with the structure of the XClass they implement. When this XClassMigratorListener acts on document, we can see a new major version in the document history with the comment "Migrated property [xxxxx] from class [yyyyyyy]".

      Undesired consequences of this creation of a major version:

      • the last modification date of these pages is updated; all search filtering and livetable sorting by last modification date becomes irrelevant - see comment
      • in the case of an app within minutes, the "last modification date" column on the homepage of the application will show the same data whenever the application structure changes, and it doesn't make sense from a functional point of view;
      • notifications are sent to watching users for these changes - see comment.

      Two options could be considered to reduce the impact of this listener on the history of documents. The options could be selectable from the wiki configuration in order to fit most use cases :

      • Option 1 : keep the current behavior, create major edits when the migrator modifies a document
      • Option 2 : create minor edits when the migrator modifies a document
      • Option 3 : do not create any new version in the document history using XWikiDocument#setMetadataDirty(false) and XWikiDocument#setContentDirty(false) before saving.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              caubin Clément Aubin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: