Prevent tags from being marked unwrangleable if they do not already belong to a fandom (or if they are fandoms)

Description

Steps to reproduce

  1. Log in as a wrangler

  2. Find yourself an unwrangled tag, e.g. by going to the freeform bin: https://test.archiveofourown.org/tag_wranglings?show=freeforms

  3. Follow the "Edit" link for the unwrangled tag you want to work with

  4. Check the "Unwrangleable" box, but do not enter anything in the "Fandoms" field

  5. Press "Save changes"

What happens
The tag is marked unwrangleable! It has also disappeared from any and all bins because there is no fandom attached.

What should happen
You should get an error message that says, "Sorry, you can't mark a tag unwrangleable until it has a fandom."

If the tag you're editing is a fandom, the Unwrangleable section of the form should just... not be there, because fandoms are never supposed to be marked unwrangleable. (For thoroughness, we probably want to add a backend check rather than just relying on the checkbox not appearing in the view. If you need an error message, that one can be, "Sorry, you can't mark a fandom unwrangleable.")

Activity

Show:
Tag Wrangler Chairs
December 14, 2020, 4:03 PM

Qem:

Oh sure! This page here has a few:

https://test.archiveofourown.org/tags/Supernatural RPF/wrangle?show=freeforms&status=unwrangleable

So each fandom has character/relationship/freeform bins, and then you can switch statuses

 

and this will show pages of tags that are attached to that fandom with that status.

And in the right hand side near the “edit” button there’s a button you can tick with remove, and then hit the wrangle button to remove a tag from the fandom.

tlee911
December 16, 2020, 3:23 PM
Edited

Thanks! I see what you mean now, and I can reproduce the behaviour as well.

I started looking at disabling that check box for unwrangleable tags, but that’s a UI fix. I think the tag model should prevent this, unless validations aren’t being applied here.

Update: The validations are being applied, since if I try to make the unwrangleable tag canonical by hacking the form I do see an error. The mystery deepens…

tlee911
December 16, 2020, 4:08 PM
Sarken
December 31, 2020, 8:54 AM

We’re going to move the rest of this to a new issue and reply this fix as-is. New issue:

QED
December 31, 2020, 10:12 PM

Everything seems to be working well: the unwrangled Tron tags (chars, rels and freeforms all tested) refused to become unwrangleable and the error message popped up at the top, and only disappeared after I added on the fandom.

DeployedToBeta

Assignee

tlee911

Reporter

Sarken

Roadmap

Tag Wrangling

Priority

High

Affects versions

Fix versions

Components

BackEnd

Difficulty

Medium

Required Access Level

Tag Wrangler

Milestone

Internal 0.9