Bulk adding members to a group is broken

I’ve come across a bug with bulk adding members to a custom group. I can repro it on try.

Repro steps:

  1. Create a new custom group
  2. Bulk add (58)users to group using username
  3. The upload appears to work: https://try.discourse.org/groups/Experienced

But group appears to have (and acts as if it has) no members

Manually joining the group causes this to happen:

But leaving then causes this:

I thought it was related to this but it’s not just the count – the functionality (i.e. tagging the group) doesn’t work.

3 Likes

Hmm can you take a look @techAPJ and see if you can repro too?

4 Likes

This is indeed because we do not update group user count when bulk adding users. The count is updated every 12 hours in EnsureDbConsistency job.

Does that mean mentioning the group in topics/posts is broken? It is working for me on try for that group.

3 Likes

Is it actually working though? I get this (and it’s the same on my other site even after 24 hours and the count has updated):

1 Like

Interesting, this might be a regression in mentioning groups. I’ll look into it today.

2 Likes

The mention notifications were getting sent, but looking at that warning I agree that this looks very confusing to end user.

I added the code to update group user count when bulk adding users to a group.

https://github.com/discourse/discourse/commit/709f201bd4a7d6e1e02a1d84cf035d0628b31c50

5 Likes