Page MenuHomePhabricator

Diffusion tagging can't handle projects with similar names
Closed, ResolvedPublic

Description

If you have two projects with similar and overlapping names, such as "Plasma" and "Plasma on Wayland" then it seems that both Herald and the tags widget on reviews get confused.

As such if you try to add "Plasma on Wayland" to a review which already has "Plasma" on it then you end up removing "Plasma" even though this wasn't what you intended to do. The opposite is also true (adding "Plasma" when it already has "Plasma on Wayland" will remove "Plasma on Wayland")

This can be seen in the history of https://phabricator.kde.org/D10235 where you can see the tug-of-war Herald is engaged in between two different rules, and with individual people. Both rules are only supposed to add Projects to the review, but also appear due to this issue have the effect of removing the other Project when it's triggered.

Event Timeline

epriestley claimed this task.
epriestley added a subscriber: epriestley.

"Plasma on Wayland" is a subproject of "Plasma".

A single object can not be simultaneously tagged with both a project and subproject -- see "Subprojects" in the documentation:

https://secure.phabricator.com/book/phabricator/article/projects/#subprojects

You can try adding both tags manually to any object yourself to see this behavior outside of Herald, and the behavior should be the same regardless of the project names.

See also T12455.

(Possibly we could add more complex rules here, like "[ Add projects ... only if object is not already in a more specific project ]" or "[ Ancestors and descendants of ... projects ]", but I'd like to wait for more use cases to arise before pursuing those. Here, maybe "take these actions [only the first time this rule matches]" is the simplest reasonable fix.)

Ah, that would certainly explain it. Sorry for the noise - when entering this I did wonder if I had missed something as it didn't make sense that a name collision would be able to cause this.

Thanks for the background on why Phabricator does this.

I'll make a note on T12455, but we might be able to render this timeline story more clearly, e.g. "X added project Y (which automatically removed Z, a subproject)" but I think this is likely fairly natural/obvious in most cases and I'm not sure if it's trivial to completely explain in the timeline.

Okay. For the sake of 100% clarity it would be nice if the timeline story did show why the action was taken as it isn't immediately clear (unless you've read the documentation of course) why it was removed.