Skip to content

Conversation

@thiemowmde
Copy link
Contributor

@thiemowmde thiemowmde commented May 6, 2016

#135 introduced several regressions that had no tests:

  • Adding a statement with the same GUID should be ignored and not create duplicates.
  • Changing a non-existing statement should be ignored and not add the new statement without removing anything.
  • Changing a statement should not change it's index position in the array. This is pretty critical because this will be visible in our database dumps.

The helper method I'm introducing here will become a lot simpler with wmde/WikibaseDataModel#664.

I wrote these tests with the previous 3.5 release and made sure they succeed in both versions. You may want to verify that.

@thiemowmde thiemowmde added the bug label May 6, 2016
@thiemowmde thiemowmde added this to the 3.6.0 milestone May 6, 2016
@thiemowmde
Copy link
Contributor Author

thiemowmde commented May 12, 2016

Steps to reproduce (in the UI):

  1. Assigning the same GUID is not possible in the UI. This can only be tested in a unit test.
  2. Open two tabs with the same item. In both tabs start editing the same statement. Hit delete in one tab and save in the other. There should be an edit conflict.
  3. It's possible that the index position bug can be seen in …/Special:EntityData/….json.

@JonasKress JonasKress merged commit c0676df into master May 12, 2016
@JonasKress JonasKress deleted the statementPatcherPatch branch May 12, 2016 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants