# Bulk Action ‘Append Tags’ not working when tags are restricted

**URL:** https://meta.discourse.org/t/bulk-action-append-tags-not-working-when-tags-are-restricted/241201
**Category:** Bug
**Tags:** tags, bulk-actions
**Created:** [October 6, 2022, 11:10pm UTC](https://meta.discourse.org/t/bulk-action-append-tags-not-working-when-tags-are-restricted/241201 "2022-10-06T23:10:04Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![littleviolette](https://avatars.discourse-cdn.com/v4/letter/l/d26b3c/32.png) [@littleviolette](https://meta.discourse.org/u/littleviolette)
#### Post date: [October 6, 2022, 11:10pm UTC](https://meta.discourse.org/t/bulk-action-append-tags-not-working-when-tags-are-restricted/241201/1 "2022-10-06T23:10:04Z")

</div>

Bulk append tags function is not working after the latest update. I am wondering whether other folks are experiencing the same issues.

Thank you!

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [October 7, 2022, 10:51am UTC](https://meta.discourse.org/t/bulk-action-append-tags-not-working-when-tags-are-restricted/241201/2 "2022-10-07T10:51:56Z")

</div>

You might get better help if you add details about whatever you’re doing that stopped working.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [October 7, 2022, 12:00pm UTC](https://meta.discourse.org/t/bulk-action-append-tags-not-working-when-tags-are-restricted/241201/3 "2022-10-07T12:00:42Z")

</div>

I have just given this a quick run-through on my test site ([14532ad425](https://github.com/discourse/discourse/commits/14532ad4259f3b9b0ba94429b5db873e5f6f7bc0)) and the Bulk Append Tags seems to be working okay.

- Go to Latest
- Open topic select and select a sample of topics
- Open gear menu and ‘Append Tags’
- Choose tag(s) and ‘Append’
- All selected topics are now tagged with those tags

Is there something else that I could try that may be different on your site?

---

<div class="post-metadata">

### Author: ![littleviolette](https://avatars.discourse-cdn.com/v4/letter/l/d26b3c/32.png) [@littleviolette](https://meta.discourse.org/u/littleviolette)
#### Post date: [October 8, 2022, 4:23am UTC](https://meta.discourse.org/t/bulk-action-append-tags-not-working-when-tags-are-restricted/241201/4 "2022-10-08T04:23:38Z")

</div>

Sorry for not being clear. Here are the steps:

- Conduct a search using the magnifying icon
- Select topics
- Open gear menu and ‘Append Tags’
- Choose tag(s) → available tags are not showing up (returns “no matches found”)

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [October 8, 2022, 9:32am UTC](https://meta.discourse.org/t/bulk-action-append-tags-not-working-when-tags-are-restricted/241201/5 "2022-10-08T09:32:32Z")

</div>

I’ve just tried through the Search list as well and my tags show in the Choose Tags input box, and are then applied when I Append them.

Are your tags restricted in some way? (And does Append Tags work for you from the Latest list?)

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [October 8, 2022, 12:35pm UTC](https://meta.discourse.org/t/bulk-action-append-tags-not-working-when-tags-are-restricted/241201/6 "2022-10-08T12:35:33Z")

</div>

Maybe try [safe mode](https://meta.discourse.org/t/53504?silent=true).

---

<div class="post-metadata">

### Author: ![littleviolette](https://avatars.discourse-cdn.com/v4/letter/l/d26b3c/32.png) [@littleviolette](https://meta.discourse.org/u/littleviolette)
#### Post date: [October 8, 2022, 5:26pm UTC](https://meta.discourse.org/t/bulk-action-append-tags-not-working-when-tags-are-restricted/241201/7 "2022-10-08T17:26:30Z")

</div>

@JammyDodger Yes all my categories have " Restrict these tag groups to this category" setting applied to it, but the tag I was trying to append falls within the allowed tag groups. I can add the same tag by going into the thread.

@pfaffman I tried [safe mode](https://meta.discourse.org/t/53504?silent=true). I got the same “no matches found”.

I was able to bulk append tags using the same steps before. 🤔

---

<div class="post-metadata">

### Author: ![Noriso](https://avatars.discourse-cdn.com/v4/letter/n/dec6dc/32.png) [@Noriso](https://meta.discourse.org/u/Noriso)
#### Post date: [December 20, 2022, 4:39pm UTC](https://meta.discourse.org/t/bulk-action-append-tags-not-working-when-tags-are-restricted/241201/8 "2022-12-20T16:39:11Z")

</div>

@littleviolette - I too had this issue on Discourse `2.9.0.beta10`. I use an advanced filter where I would filter certain types of content and then bulk append tags to that content.

I noticed that some tags would be working but others would not. It turns out that the ones that were not working were part of the Category → Tags Setting:

 ![Tag Groups](https://global.discourse-cdn.com/meta/original/4X/6/2/c/62c8500bf679ee69f424ee709b1225f504d926d0.png)

Having the tags there did not allow me to bulk append an advanced search, even if the tags I was trying to use were from that same category.

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [January 10, 2024, 2:33pm UTC](https://meta.discourse.org/t/bulk-action-append-tags-not-working-when-tags-are-restricted/241201/10 "2024-01-10T14:33:57Z")

</div>

This is still an issue.

- create a tag `#example`
- try to bulk add it to topics in a category → tag appears in the drop down
- add it to a tag group `restricted`
- add the tag group as “Restrict these tag groups to this category” for that category
- try to bulk add it to topics in that same category → tag does not appear in the drop down anymore

This is happening because `/tags/filter/search?q=&limit=5&filterForInput=true` does not even take the category into account.

---

<div class="post-metadata">

### Author: ![PeakProsperity](https://avatars.discourse-cdn.com/v4/letter/p/c57346/32.png) [@PeakProsperity](https://meta.discourse.org/u/PeakProsperity)
#### Post date: [January 27, 2024, 6:25pm UTC](https://meta.discourse.org/t/bulk-action-append-tags-not-working-when-tags-are-restricted/241201/11 "2024-01-27T18:25:58Z")

</div>

Can somebody let me know if this will be addressed in an upcoming update? We’re finding it very frustrating that we cannot append tags after a topic is created. It’s quite an arduous process of going into the tag group, removing the tag from the group, going back to the category, appending the tag, and then going back to the tag group settings to add it back in.

Thanks for your consideration.

---

<div class="post-metadata">

### Author: ![nat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nat/32/235063_2.png) [@nat](https://meta.discourse.org/u/nat)
#### Post date: [January 29, 2024, 3:13am UTC](https://meta.discourse.org/t/bulk-action-append-tags-not-working-when-tags-are-restricted/241201/13 "2024-01-29T03:13:21Z")

</div>

Gotcha. We’ll be looking at this.

---

<div class="post-metadata">

### Author: ![Akemi\_Nojima](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/akemi_nojima/32/343056_2.png) [@Akemi\_Nojima](https://meta.discourse.org/u/Akemi_Nojima)
#### Post date: [April 8, 2024, 9:13pm UTC](https://meta.discourse.org/t/bulk-action-append-tags-not-working-when-tags-are-restricted/241201/17 "2024-04-08T21:13:57Z")

</div>

Hi, is there any updates on this issue?  
We are restricting the tag groups to each categories and those tags in the tag groups in the specified categories won’t show up as options.

---

<div class="post-metadata">

### Author: ![martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin/32/491371_2.png) [@martin](https://meta.discourse.org/u/martin)
#### Post date: [April 9, 2024, 5:43am UTC](https://meta.discourse.org/t/bulk-action-append-tags-not-working-when-tags-are-restricted/241201/19 "2024-04-09T05:43:33Z")

</div>

Hi all,

I’ve been looking over this issue again, and it’s definitely a tricky one to solve. The main problem here is that, with the topic bulk “Append Tags” action, you could be potentially appending tags to topics in N different categories.

The only way we can really address this issue is if we only allow selected of restricted tags to happen if **all of the bulk selected topics are in the same category**. This way, we can:

- Change the tag search in the bulk action modal from `/tags/filter/search?q=&limit=5&filterForInput=true` to `/tags/filter/search?q=&limit=5&filterForInput=true&categoryId=999`
- Also show some visual indicator in the bulk action modal that only one category of topics is being operated on, something like this (but nicer)

 ![2024-04-09_15-41](https://global.discourse-cdn.com/meta/original/4X/9/a/8/9a8db90b4ed5cbbdca001edc5b59150a8ec2af1f.png)

The tag search would then allow you to choose restricted tags. This also would fix this related topic [Bulk Tagging offers wrong tags for category](https://meta.discourse.org/t/bulk-tagging-offers-wrong-tags-for-category/299669) .

If there are no objections to this, we can start work on it soon. cc @tobiaseigen

---

<div class="post-metadata">

### Author: ![Akemi\_Nojima](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/akemi_nojima/32/343056_2.png) [@Akemi\_Nojima](https://meta.discourse.org/u/Akemi_Nojima)
#### Post date: [April 9, 2024, 6:16am UTC](https://meta.discourse.org/t/bulk-action-append-tags-not-working-when-tags-are-restricted/241201/20 "2024-04-09T06:16:32Z")

</div>

Thanks for looking into this! I am selecting only the topics in the same category, no other topics from other categories are selected.

 ![Screenshot 2024-04-08 at 11.08.49 PM](https://global.discourse-cdn.com/meta/original/4X/9/b/1/9b1e3a9684c0a4c9a8d7b4f4a7483ca67aa581d7.png)  
 ![Screenshot 2024-04-08 at 11.11.10 PM](https://global.discourse-cdn.com/meta/original/4X/3/2/8/328c87ae4211e3d4ab46610bfc7bfadd7555153a.png)  
 ![Screenshot 2024-04-08 at 11.12.27 PM](https://global.discourse-cdn.com/meta/original/4X/6/1/4/6141e599e5a4b5285bd45d36ed3879b594c1697c.jpeg)

Did I set something wrong?Any workarounds?  
We have manually copied old Known issues posts from the legacy system and wanted to bulk tag them as either known issue or resolved issue.  
Thank you for your help!

---

<div class="post-metadata">

### Author: ![martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin/32/491371_2.png) [@martin](https://meta.discourse.org/u/martin)
#### Post date: [April 9, 2024, 6:21am UTC](https://meta.discourse.org/t/bulk-action-append-tags-not-working-when-tags-are-restricted/241201/21 "2024-04-09T06:21:38Z")

</div>

> [@Akemi\_Nojima](#):
>
> I am selecting only the topics in the same category, no other topics from other categories are selected.

> [@Akemi\_Nojima](#):
>
> Did I set something wrong?Any workarounds?

No you definitely didn’t set anything wrong 🙂 It’s just a limitation of the bulk append modal right now, it’s not limiting the tag search results by category. And the only current workaround is to remove the “Restrict these tags to this category” rule before appending the tags and adding them back after.

I definitely think the fix will be as described in my post above since you are confirming you’re only choosing topics inside the same category. Will try and get work on this started tomorrow if there are no other objections from others in this topic.

---

<div class="post-metadata">

### Author: ![martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin/32/491371_2.png) [@martin](https://meta.discourse.org/u/martin)
#### Post date: [April 12, 2024, 3:12am UTC](https://meta.discourse.org/t/bulk-action-append-tags-not-working-when-tags-are-restricted/241201/23 "2024-04-12T03:12:00Z")

</div>

A fix for this has now been merged 🙂

[https://github.com/discourse/discourse/pull/26602](https://github.com/discourse/discourse/pull/26602)

@Akemi_Nojima , I will deploy your site today so you get these changes.

---

<div class="post-metadata">

### Author: ![Akemi\_Nojima](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/akemi_nojima/32/343056_2.png) [@Akemi\_Nojima](https://meta.discourse.org/u/Akemi_Nojima)
#### Post date: [April 12, 2024, 3:40am UTC](https://meta.discourse.org/t/bulk-action-append-tags-not-working-when-tags-are-restricted/241201/24 "2024-04-12T03:40:05Z")

</div>

wow! amazing! Thank you so much!

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [April 15, 2024, 7:00am UTC](https://meta.discourse.org/t/bulk-action-append-tags-not-working-when-tags-are-restricted/241201/25 "2024-04-15T07:00:04Z")

</div>

This topic was automatically closed after 2 days. New replies are no longer allowed.
