Always save refactoring links operations as minor versions

Hi everyone,

I noticed yesterday that apparently we are not consistent when saving pages due to refactoring links when performing a rename / move:

  • when renaming a relative link we perform a save with a minor version
  • when renaming an absolute backlink we perform a save with a major version

You can see the code here: xwiki-platform/xwiki-platform-core/xwiki-platform-refactoring/xwiki-platform-refactoring-default/src/main/java/org/xwiki/refactoring/internal/DefaultReferenceUpdater.java at master · xwiki/xwiki-platform · GitHub

For me this strategy doesn’t make sense, and in particular I don’t think we should ever perform a major version save for such operation: if you move a set of pages and you have a page containing multiple links, you will end up with multiple major versions added to your page because of a single move.

So the proposal is to change the strategy to always perform minor version save when doing such link refactoring.

wdyt?

2 Likes

+1 thx, looks like a bug to me.

1 Like

+1 IMO saving a major version is only something we should do when we can expect the user to know about it / understand how his action resulted in it. Multiple major versions for multiple subactions in the same batch seem like it’d quickly flood the version history for pretty much no advantage compared to minor versions.

Note that this comment will also apply for the upcoming implementation of batch actions: for all the actions in a batch, I think it wouldn’t make sense too have more than one major version per page.

Thanks!
Lucas

+1

+1

+1, thank you!

Done with Loading...

1 Like