RocketChat / RocketChat/Rocket.Chat

channel.csv import does not refer to registered users

Open
#20,756 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

When I import a channel using channle.csv, the owner of the channel becomes the user who executed the import.
According to the documentation, two columns of the CSV file should be used.

When I read the source code, it seems that the user list when importing channels is obtained from user.csv. In other words, registered users are not referring to it.

Is this a bug?

Steps to reproduce:

1.Add the following users to Rocket.chat.

  • owner01
  • user01
  • user02
  1. Prepare a data.zip containing the following channel.csv
"channel01","owner01","public","user01;user02"

3 .Log in to the web UI as the admin user and import data.zip.

Expected behavior:

Check the owner of channel01.
owner01 is displayed to the channel owner.

Actual behavior:

Check the owner of channel01.
admin is displayed to the channel owner.

Server Setup Information:
  • Version of Rocket.Chat Server: 3.9.7 and 3.11.1
  • Operating System: CentOS8
  • Deployment Method: docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog: don't know what that is
  • NodeJS Version: v12.18.4
  • MongoDB Version:4.0.22
Client Setup Information

no client used

Additional context

If you include the following users.csv in the zip, the channel owner will be "owner01".

owner01,owner01@example.com,owner name

Unless you have a specific reason, you should register a registered user as the channel owner.
It's annoying to always create users.csv.

Relevant logs:

none

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the channel.csv import entry point and trace how the channel owner is resolved against registered users, comparing that behavior with the documented CSV columns. Done means an existing registered user named as the owner is assigned without requiring users.csv, while the documented import behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.