Renaming Tag to Existing Tag Should Merge

Since Tags are so important in Discourse best practices, I believe we need at least the basic operations for managing them. And it seems like one that is missing is being able to merge one tag into another. For example, if users create both #dog and #dogs, at some point the admin will want to consolidate these.

What I’d expect is that when I tell it to rename #dog to #dogs it would say, “Tag already exists, do you want to merge this one in to that one?” instead of just denying the operation as it does currently.

As it stands it seems like I’d have to modify those topics one by one and finally delete the empty tag.

There is a related topic about synonyms, which is related to some degree.

1 Like

The tools already exist to do this, just not in the form of a merge button. It’s actually useful to be alerted to a tag already existing, and a merger would be irreversible, so it’s probably wise that it’s not just a click away.

You can also just visit a tag page, then click on the icon to the left of Topic which reveals checkboxes to the left of each topic and the following buttons:

46%20PM

Hit Select All on the posts and use Append Tag on the wrench menu:

Or if it’s the only tag on those posts Replace Tag works too.

After that you can delete the unwanted tag.

6 Likes

Thanks Stephen, very useful!

(And FWIW I wasn’t suggesting just a “one click” action. I was advocating having to click “rename tag” and then having to click through another confirmation as well. But this workaround of append and delete should be fine for me.)

Will this work even if i have 999_999_999 topics? (i would really like not to be in that situation, but you never know :smiley: )

Old topic, but because I found it by search :wink:

Sure — but in slots of 30 posts.

And because I’m in that situation (well, not exacly that huge amount of replaced tags :rofl: ) I’ll continue searching how to do it on shell.

IIRC, you have to scroll down to load more, and then ‘select all’. I think it only grabs the ones it can ‘see’, so you have to scroll to load them first.

2 Likes

Thanks. That possibility never came to my mind.

But… That menu isn’t helping when there is just some tags to changed or renamed. I can remove all tags or change all tags, not one. And posts typically have more than just one tag, and all posts, that all post sharing one tag have another different tags too — and those should leave alone.

So this solution doesn’t help when there is a need merge/rename tags. It helps when there is a need to alter every tags to same on plenty of posts.

Or have I misunderstood again something?

I’m not sure I’m following? :slightly_smiling_face: My tip was for the ‘only the 30 at a time’ issue. The bulk select may not be the solution for all cases. I think it works on a search result page as well as the topic list though, if that’s any help?

And it’s also now available on mobile too. :tada:

That is really common issue :rofl:

We, or I, can blame mine lousy english skills and badly formated sentences. After thanks that next chapter, that started unluckily But… didn’t refer to your tip, but the orginal advise to use that tool.

1 Like

Ha :slightly_smiling_face: Yes, I think I see now.

I think the original feature request itself is a good one. :+1: Being able to merge tags would be easier than the bulk action dance.

Edit: In fact, it’s such a good feature it’s been added already. :slight_smile:

1 Like

I thought there is an option to merge tags.

1 Like

That is not merging. It is more or less redirection. Or so I reckon, and I can be really wrong too,

Or is that redirection there for future needs and if it will be trashed right away old redirected ones have changed to new one?

I have to check because I’m fighting with that now.

I was wrong. It is merging indeed and redirecting is just for future use if someone tries to use old one. Nice!

  • old tag is A with amount X posts
  • new tag is B, used in zero posts
  • A is synonym to B
  • all posts have changed from tag A to tag B
  • synonym connection shall be trashed
  • all posts stay under tag B and tag A has zero posts

Splendid indeed :+1:

3 Likes

God catch @Moin :slight_smile: I’ll close this topic off. :+1:

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.