Log in as a wrangler
On the New Tag page, create a canonical tag and remember its type, e.g. Meta Character Tag 1. This will be your meta tag.
Post a work with another tag of the same type, e.g. Sub Character Tag 1. This will be your sub tag.
From the edit page for Sub Character Tag 1, canonize the tag
Again from the edit page for Sub Character Tag 1, add Meta Character Tag 1 as a meta tag
Bookmark the work you posted earlier
Wait a few minutes
Yay, both the work and the bookmark appear on Meta Character Tag 1's work and bookmark listings
From the edit page for Sub Character Tag 1, decanonize the tag
Wait a while
Uh oh, the work and bookmark still appear on Meta Character Tag 1's work and bookmark listings
What should happen instead:
The work and bookmark should be removed from those listings.
It wouldn't hurt to test bookmarks of works, series, and external works. Definitely check that a work/bookmark does not get removed from the tag listing if it is also tagged with Meta Character Tag 1 or another tag that is subbed to Meta Character Tag 1.
Also, make sure to test this with the “Make tag non-canonical and unhook all associations” option as well. You’ll have to be logged in as an admin to use that.
This happens because decanonizing a tag does not remove any filter taggings it inherited from meta tags.
This is the work when both Sub Character Tag 1 and Meta Character Tag 1 are canonical:
The filter tagging with filter_id 1218470 is Sub Character Tag 1. The inherited filter tagging with filter_id 1218467 is Meta Character Tag 1.
This is the work when Sub Character Tag 1 has been decanonized:
Note that the filter tagging with filter_id 1218470 (Sub Character Tag 1) is gone, but the meta tag's filter tagging remains.
Please refer to tickinginstant’s comment about the “Make tag non-canonical and unhook all associations” option for information on potential race conditions when using that option.
Created canonical character tags “Char Meta” and “Char Sub 1” and made Char Meta the metatag of Char Sub 1.
Edited existing Work 1, added the character tag “Char Sub 1”
Posted new Work 2, with the character tag “Char Sub 2”
Made Work 1 and Work 2 into Series 1 (tagged with Char Sub 1 and Char Sub 2)
Created external Work 3, with the character tags “Char Meta” and “Char Sub 2”
Created external Work 4, with the character tag “Char Sub 2”
Edited existing Work 5, added the character tag “Char Sub 2”
Made Work 5 into Series 2 (tagged with Char Sub 2)
Bookmarked Work 1, Work 2, Series 1, Series 2
Edited “Char Sub 2” to be canonical and subtagged to “Char Meta”
Checked works page for Char Meta: shows Work 1, Work 2, Work 5 (10 minutes)
Checked bookmarks page for Char Meta: shows Work 1, Work 2, ExWork 3, ExWork 4, Series 1, Series 2
Decanonized Char Sub 2. (Also had the issue where Char Meta appeared to still be in the metatag field before refreshing)
Checked works page for Char Meta: shows Work 1 only (10 minutes)
Checked bookmarks page for Char Meta: shows Work 1, ExWork 3, Series 1
Looks good! Will still need someone to do the admin decanonizing test, though.
Did the admin decanonising test on two tags, Odd Future and BossHoss.
Confirmed that BossHoss no longer appears in music RPF.
Confirmed that Odd Future and the former Odd Future synns, tyler the creator - Fandom, and OFWGK†Δ no longer appears in either hip hop rpf or hip hop’s metatag music rpf; (but the other work which had other relevant tags do).
Made New Canon and made fic with canon to sub in Additional Tags.
Work and bookmark both appeared.
Work and bookmark disappeared instantly
Tested with an older additional tag on same new meta tag. The older tag had four works and I bookmarked one of them.
Uh...Might be a new issue. So far the bookmark shows up fine but the only work showing up is the one I bookmarked.
After 10-ish minutes, the other three appeared in works. A second bookmark appeared as well.
Resuming canonical test by decanonizing the sub tag
Works and Bookmarks disappeared within five minutes.
No problems other than a slightly sluggish response from three works in the followup test.
Second Followup Test
Made New Canon and made fic with canon to sub in Relationships because I want to see what happens with Char tags in the mix.
Added Character Tags to sub tag.
Work and bookmark both appeared.
Decanonizing without removing Character Tags at 1:48 AM UTC-5
Work and bookmark disappeared by 2:04 AM UTC-5
This seems to work now, except for the issue that the metatag doesn’t disappear from the subtag’s edit page after decanonizing without a manual reload. Maybe worth putting into a different ticket, though.
This is fixed in https://github.com/otwcode/otwarchive/pull/3824. ticking instant made removing associations synchronous:
In the current code, when you check the box to remove a metatag, it doesn't immediately remove the metatag. Instead, it queues up a job to remove the metatag. This means that the metatag remains on the edit page until the user refreshes (or, if the utilities queue is long, after the the queue has finished running and the user refreshes). This PR makes the action synchronous, and modifies the remove_association function to ensure that removing the association is a fast operation.
Second test for the admin option "Make tag non-canonical and unhook all associations".
Found an existing canonical character tag: https://test.archiveofourown.org/tags/Rei.
Edited a work to add new character tag "Rei (5432)".
Canonized "Rei (5432)" and added "Rei" as its metatag.
Bookmarked the earlier work. <1m later, the work and the bookmark showed up in listings for "Rei".
As an admin, "Make tag non-canonical and unhook all associations" did not appear on on "Rei (5432)", because the tag has no mergers or children. Edited a throwaway work to add relationship "Rei (5432)/Asuka" (left non-canonical). Made "Rei (5432)/Asuka" a child relationship of "Rei (5432)".
As an admin, used "Make tag non-canonical and unhook all associations" on "Rei (5432)".
Note: right after using "Make tag non-canonical and unhook all associations", the response page still showed metatag "Rei" on the edit page for "Rei (5432)". Immediately reloaded and it went away, though.
<5m later, the work and the bookmark disappeared from listings for "Rei".