Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renaming a tag to an existing tag creates tag duplicates on entries #2084

Open
dsalo opened this issue May 10, 2024 · 1 comment
Open

Renaming a tag to an existing tag creates tag duplicates on entries #2084

dsalo opened this issue May 10, 2024 · 1 comment
Labels
bug it's broken! tags

Comments

@dsalo
Copy link

dsalo commented May 10, 2024

I had two tags "harassment" and "abuse" that I wanted to consolidate. (I apologize for this example, I sometimes teach very depressing stuff.) I renamed "harassment" to "abuse" via the tag-rename tool (which I love, thank you for that). Any link that was tagged with both terms now has two "abuse" tags, as seen in the screenshot below.

Screenshot 2024-05-10 at 14-08-09 Search abuse - Salo linkspam

This doesn't seem to break anything -- tag-searching "abuse" still works as expected, I checked -- but it clutters the display a bit. Possible to have the tag-replace process check each link to see if the new tag is already there?

@kcaran
Copy link

kcaran commented May 14, 2024

I was surprised that this was occurring, because I had submitted a pull request to check for duplicates before adding tags awhile ago:

#1918

But I only updated the addTag() function, not renameTag(). I've submitted a pull request to make renameTag() effectively merge the old and new tags if both exist on a bookmark.

I had to rewrite most of ManageTagControllerTest. It heavily used stubs and I don't think it was actually testing the renaming of the tags. The new version fails (as expected) if you run it against the current bookmark code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug it's broken! tags
Projects
None yet
Development

No branches or pull requests

3 participants