一括でユーザーセットにバッジを付与

バッジは、良い仕事をしている人を称える素晴らしい方法です。Discourse では、複数のユーザーにバッジを一度に授与できるようになりました。

管理パネルのバッジセクションに移動すると、「新規」ボタンの隣に「一括授与」という新しいボタンが表示されていることに気づくでしょう。

Screen Shot 2020-01-15 at 11.34.31

クリックすると、授与するバッジを選択して開始するよう促されます。

授与したいバッジを選択し、ユーザーのメールアドレスまたはユーザー名を 1 行に 1 つずつ記載した CSV ファイルをアップロードしてください。

その後、以下のメッセージが表示されます。

Discourse が一致するユーザーを検索し、バッジを授与して通知を送信します。

「いいね!」 48

This is cool.

I propose changing this language to “awarding a badge to a set of users”, as group has a specific meaning in Discourse and a bunch of random email addresses in a CSV isn’t it :wink:.

「いいね!」 23

Very nice, This will be useful :slight_smile:

「いいね!」 5

Awww Yiss, that’s very handy. Thanks :slight_smile:.

「いいね!」 3

This is great, thanks for the feature :slight_smile:

「いいね!」 5

Selecting them from a user list could be easier if possible. Good feature anyway.

「いいね!」 5

Yes that’s my ideal idea. :grin:

Just press on users you want to award too.

「いいね!」 2

Sorry, but I’m not 100% clear on this. Terminology I’m familiar with is:

enclosure, delimiter (the separator) and terminator

enclosure is often quotation marks
delimiter is often a comma
terminator is often a newline

eg.

"1", "Bob", "rkelly@gmail.com", "CA" 
"2", "Carol", "counselor@hotmail.com", "CA" 
"2", "Ted", "tman@yahoo.com", "FL" 

I doubt you mean

rkelly@gmail.com 
, 
counselor@hotmail.com 
, 
tman@yahoo.com 
「いいね!」 1

What I meant was:

rkelly@gmail.com,
counselor@hotmail.com, 
tman@yahoo.com

I edited the post.

「いいね!」 6

When bulk-adding users to a group, the system expects a list of user names. When bulk-adding users to a badge, the system expects a .csv file with e-mail addresses.

Personally I prefer the list of usernames, as it’s a lot easier to get those from the forums without jumping through admin-y hoops, and I’ve got some Excel tricks that can spit out a copy-and-pastable list. I used to bulk-assign badges by bulk-adding a list to a temporary group, then changing the badge query to assign to that whole group. When ‘award a badge to a set of users’ popped up I’d hoped to cut out a step…

Is there any way to make the list-of-users method a valid alternative way to bulk-assign badges?

「いいね!」 8

I agree we should be supporting both.

If the first item in the list has an “@”, then import by email, otherwise, import by username.

Also, we could be a little more lenient when it comes to the format of that list.

We could just require the emails/usernames to be on their own line and then do a split("\n"), remove any empty lines, remove any trailing “,” and remove any pair of single/double quotes (eg. gsub(/^['"]|['"]$/, "")).

「いいね!」 9

I know it’s hard and starts to risk mission-creep, but I wonder if over time the admin UI could aim towards more consistency across all Admin bulk operations? For example when:

  1. Awarding Badges in bulk: Select badge then upload a CSV of users’ email addresses

  2. Adding users to a Group in bulk: Select group then paste a list of usernames or emails, one per line

  3. Inviting users to Discourse in bulk: Upload a CSV containing users’ email addresses (optionally specifying groups(s) to add them to and the initial post to show them)

Clearly these have areas of commonality but also areas of definite disparity where they are not doing the same thing. So how easy it is to work towards a consistent UI paradigm for all Admin bulk actions, I don’t know. But I thought I’d raise the issue here since it is being discussed.

Of all three variants, I’d say the nicest at the moment is the Bulk Add To Group ‘Paste a list of usernames or emails, one per line’.

Quite often I want to Invite several users (say 5-10) and the one-by-one invite method is a bit irritatingly slow, but the CSV invite method is a bit faffy and requires me to fire up another program, or edit CSV manually. Even if the CSV upload was kept for the really BIG bulk invites, it would be great to have an Invite Users dialog like the Bulk Add To Group one. Of course it could only accept email addresses, one per line, but this would be fine.

「いいね!」 8

Thanks everyone for the feedback! :slight_smile:

We added username support here:

「いいね!」 13

Though still not as simply as pasting a list of usernames into a box, that’s a great step forward from needing e-mails! Are there any plans to unify the bulk handling of adding users to groups or badges? I’m not a programmer, but that sounds like re-usable code to me :slight_smile:

「いいね!」 2

これを使って、ユーザーにバッジを複数回付与することは可能でしょうか?私のテストでは、それはサポートされていないように見えます。

ユーザーリストに対してバッジを一括付与しても、すでにバッジを持っているユーザーには2度目の付与が行われません。

「いいね!」 1

バッジの「複数回付与可能」チェックボックス(バッジ管理ページの下部セクションにあります)がオンになっている場合、この方法でバッジを複数回付与できます。

「いいね!」 3

有効化していますが、CSV インポート(すでにバッジを取得しているユーザーのユーザー名リストのみを含む場合でも)では、再度付与されません。バッジが「複数回付与済み」として表示されるには、まずユーザーに手動でバッジを付与する必要があります。

「いいね!」 2

CSVをアップロードするのではなく、手動で1人または2人にバッジを付与することはできますか?

何らかの理由で、「熱心なユーザー」(10日間連続でログインする)が、12日間連続でログインしたユーザーに対して機能していません。

「いいね!」 1

そのバッジはかなり信頼できると思いますが、タイムゾーンとUTCの違いでそう見えないことがあります。

現在、そのバッジを手動で付与することはできないと思いますが、ユーザー名のみのCSVを作成するのは一瞬です。携帯電話のGoogleスプレッドシートを使って試してみましたが、とても速かったです。:+1:

「いいね!」 6

OPからCSVの正しいフォーマット方法が明確でなかったため、この投稿を強調しておきます。

「いいね!」 3