Page MenuHomePhabricator

ChangeTagStore::updateTags fails to add tags on log if associated rev ID already has that tag
Closed, ResolvedPublicBUG REPORT

Description

Summary

ChangeTagsStore::updateTags allows adding tags to log entries. However this fails if:

  • That log entry is associated with a revision ID that has that tag
  • That revision ID is associated with a different log entry that has that tag

This causes issues for Move-Files-To-Commons (FileImporter extension) which creates an upload and import log entry associated with the same revision ID, attempting to tag them all as having been uploaded with file importer

Steps to replicate the issue

  1. Use file importer to import a file
  2. Go to Special:Log
  3. Look at the import logs and find the log created by your file import
  4. Notice it has the fileimporter tag
  5. Look at the upload logs and find the log created by your file import
  6. See that it does not have the fileimporter tag as expected

For example: https://commons.wikimedia.org/wiki/Special:Log?type=&user=&page=File%3ASturpen+%282006%29.jpg&excludetempacct=1&wpdate=&tagfilter=&wpfilters%5B%5D=newusers&wpFormIdentifier=logeventslist shows that the fileimporter change tag is present on the import log but not the upload log (even though both should have the change tag)

Acceptance criteria

  • ChangeTagsStore::updateTags correctly handles the case above, adding the fileimporter change tag to both log entries

Event Timeline

Change #1337643 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/core@master] ChangeTagsStore: Handle logs with same associated rev IDs

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

Change #1337643 merged by jenkins-bot:

[mediawiki/core@master] ChangeTagsStore: Handle logs with same associated rev IDs

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