Page MenuHomePhabricator

The wrong label shows up while performing an undo
Closed, ResolvedPublic

Description

See https://en.wikipedia.beta.wmflabs.org/w/index.php?title=Foobar&action=edit&undoafter=383159&undo=385014 You will see a label that says "Damaging/Bad-faith". But that's wrong. The edit that is being undone has no labels.

E.g., see https://en.wikipedia.beta.wmflabs.org/wiki/Jade:Diff/385014

Event Timeline

Halfak triaged this task as High priority.Jun 30 2020, 9:10 PM

I tried to reproduce this issue by creating a new edit and tried to undo it here: https://en.wikipedia.beta.wmflabs.org/w/index.php?title=Foobar&action=edit&undoafter=418935&undo=438261

Since there was no label yet, Jade also showed there is no label for this edit: https://en.wikipedia.beta.wmflabs.org/wiki/Jade:Diff/438261

Could you please try with a new edit?

I added a label to 438261 in the Undo interface and then loaded the undo interface for the previous edit (418935) and it showed me the label for 438261 rather than no label.

Thank you for the explanation @Halfak. I have managed to reproduce this issue and fixed the bug.

The wrong label was showing up while performing an undo because Jade was using the latest revision id instead of the current undid revision id.

Change 614689 had a related patch set uploaded (by Kevin Bazira; owner: Kevin Bazira):
[mediawiki/extensions/Jade@master] Fixed undo edit page Jade wrong labels bug

https://gerrit.wikimedia.org/r/614689

Change 614689 merged by jenkins-bot:
[mediawiki/extensions/Jade@master] Fixed undo edit page Jade wrong labels bug

https://gerrit.wikimedia.org/r/614689