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
- Use file importer to import a file
- Go to Special:Log
- Look at the import logs and find the log created by your file import
- Notice it has the fileimporter tag
- Look at the upload logs and find the log created by your file import
- 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