Migration for Like right bug

Hi everyone,

@arcilli discovered few weeks ago an important bug related to the Like right recently introduced and available in LTS and stable: https://jira.xwiki.org/browse/XWIKI-18510. In two words this bug create inconsistencies between Right UI for Like and object editor UI: you can get the green marks on Like right or the red cross (allowing or forbidding the right) the right will be applied but you won’t be able to see it selected in object editor, and it’s the same the other way around.
The fix is quite easy, however if we don’t do any migration it will have the following impact:

  1. Like Rights set from the Right UI will be displayed in object editor too
  2. Like Right set from the object editor won’t be displayed anymore anywhere, even from the object editor UI

So we could decide that it’s acceptable (the change will be reverted at next save): in that case we need to document that situation 2 will occur in our migration notes. If we don’t consider it’s acceptable then it means we need to write a migration so that rights set from object editor are displayed in Right UI.

So I open this vote for 48 hours only since the RC release will happen next monday, so I’ll close this vote on thursday morning (Paris Time), here’s the proposal for the vote:

Add a migration for Like rights

I’m personally on -0 for it: I don’t really think there was many rights set from the object editor and I do think it would be enough to document this in migration notes. Moreover a new migration means more possibility for mistakes in the code.

[EDIT: this post was wrong in its first version since I wrongly interpreted the issue]

as long as this fix would be pushed in the LTS as well, I completely agree with this logic and I’ll support you in not having a migration.

If the fix won’t be included in the LTS, we should imagine a long term usage of the LTS version which can endup including lots of Like rights settings which will pose a migration problem at upgrade time (if the migration needs to be done manually), in which case we probably cannot do without the migration.

Clearly the fix will be cherry-picked in LTS.

I will actually invalidate and close right now this vote: after discussing it more extensively with @tmortagne on the chat (beginning of the discussion here: You're invited to talk on Matrix) it appears that it’s actually a really bad idea to perform a migration for this, since a migration is expensive and can have bad impacts in case of bugs. Moreover this whole situation is caused by a UI bug in the Rights UI and in the Right level displayer (used in object editor) that should handle rights without taking into account the case, since the API does not take it into account.

So I’m -1 for my own proposal and closing this vote.

The plan to action for this is the following:

  1. Fix right displayer
  2. Rename Like right (to be consistent with other rights)
  3. Fix UI right