Problem is that we don't undo our changes to the first item (merge from) if the second item (merge target) can't be saved. There's also a TODO about that in the code "//todo if the second result is not a success we should probably undo the first change".

Solving that in a clean manner is hard, I guess... but this is actually causing trouble in production.

After further discussion with Hoo it turns out the failed merges are due to the database having bad data in it already, i.e. two items that have the same label and description.
Because of this we can not simply undo the edit as wikibase will not allow this edit to happen.
Instead we should check that both edits will be possible before merging, this might require some further refactoring of content handler classes

Add Comment

Text is available under the Creative Commons Attribution-ShareAlike 3.0 License; code is available under the GNU General Public License or other appropriate open source licenses. By using this site, you agree to the Terms of Use and Privacy Policy. · Wikimedia Foundation · Privacy Policy · Terms of Use · Disclaimer

Column Prototype

This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.