Operator: Anomie (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 00:27, Thursday, June 11, 2020 (UTC)
Function overview: Update redirects created for AnomieBOT 74 when they no longer match the corresponding title-with-en-dashes.
Automatic, Supervised, or Manual: Automatic
Programming language(s): Perl
Source code available: User:AnomieBOT/source/tasks/EnDashRedirectCreator.pm
Links to relevant discussions (where appropriate): No direct discussion, but see for example Wikipedia:Redirects for discussion/Log/2020 June 10#Responses to the 2019-20 coronavirus pandemic
Edit period(s): Periodic
Estimated number of pages affected: About 3599 to start (see quarry:query/45755), then depends how often people change the redirects
Namespace(s): Same as AnomieBOT 74
Exclusion compliant (Yes/No): Yes
Function details: When the target of the AnomieBOT-created ASCII-hyphen redirect no longer matches the en-dash-containing title (e.g. the en-dash-containing title was a redirect and has since been unredirected or retargeted), the bot will update the redirect to match the en-dash-containing title. It may also update the ((Redirect shell)) or other templates when doing so.
For example, the bot originally created Responses to the 2019-20 coronavirus pandemic in April 2020 as a redirect to Timeline of the 2019–20 coronavirus pandemic in April 2020 because Responses to the 2019–20 coronavirus pandemic in April 2020 redirected there. But then someone unredirected that title, and the bot-created redirect should have been updated to point to it but wasn't. And later someone moved it to Responses to the COVID-19 pandemic in April 2020, leaving a different redirect at Responses to the 2019–20 coronavirus pandemic in April 2020, and again Responses to the 2019-20 coronavirus pandemic in April 2020 wasn't updated.
Note that the bot will only update redirects where the oldest revision was created by the bot. It won't update something like 0-1 to match 0–1 because the former was not created by AnomieBOT.
To avoid the possibility that multiple titles containing en-dashes map to the same ASCII-hyphen redirect causing the bot to continually update the ASCII-hyphen for each of them in turn, the bot will look for its ((User:AnomieBOT/Auto-G8)) template and skip if it exists and has a target that doesn't match the current en-dash-containing title. It looks like only one example of this situation currently exists in mainspace: 2020–21 South-West Indian Ocean cyclone season vs 2020–21 South–West Indian Ocean cyclone season.
I note that if for some reason a human tries to make a bot-created redirect not match the corresponding en-dash title (e.g. creating a new 0-1 vs 0–1 like situation), the bot will overwrite it. If we actually want that mismatch to exist for some reason, it could be worked around by deleting the revision where AnomieBOT created the page (or revision-deleting AnomieBOT's username on the revision) so AnomieBOT will no longer see it as being AnomieBOT-created. Anomie⚔ 00:27, 11 June 2020 (UTC)[reply]
Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Primefac (talk) 23:58, 15 June 2020 (UTC)[reply]