Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

member list is randomly sorted #22145

Open
CvH opened this issue May 26, 2021 · 37 comments · May be fixed by #28954, #30843 or #33555
Open

member list is randomly sorted #22145

CvH opened this issue May 26, 2021 · 37 comments · May be fixed by #28954, #30843 or #33555
Labels
contrib: good first issue Issues that you can solve to start contributing :)

Comments

@CvH
Copy link

CvH commented May 26, 2021

Description:

The users at the memberlist are randomly sorted and it is difficult to find someone without actually using the search, /directory/users works properly in that regard.
The "sort by" setting is also ignored for it.

Steps to reproduce:

  1. open the memberlist at the general channel

Expected behavior:

list the members in alphabetically

Actual behavior:

image

Server Setup Information:

  • Version of Rocket.Chat Server: 3.15.0
  • Operating System: Ubuntu
  • Deployment Method: snap
  • Number of Running Instances: 1
  • DB Replicaset Oplog: -
  • NodeJS Version: v12.22.1
  • MongoDB Version: 3.6.14

Client Setup Information

  • Desktop App or Browser Version: Chrome latest
  • Operating System: Win/Linux

Additional context

Relevant logs:

@emikolajczak
Copy link

Hi, I confirm. It's hard to say what it is sorted by. Certainly not by Full name or Username

@ankar84
Copy link

ankar84 commented Jun 1, 2021

Confirm that issue. Users complaining about that.

@johncrisp
Copy link

First thing is please upgrade immediately to 3.14.4

See the release notes for why.

Has anyone tested this on either 3.14.4 or 3.15?

@CvH
Copy link
Author

CvH commented Jun 2, 2021

@johncrisp currently running 3.15, still the same issue appears (updated issue description with new version)

@ghost
Copy link

ghost commented Jul 8, 2021

on 3.16, sorting by name seems to be working. but sorting by activity is totally random

@ivanvsobolev-devops
Copy link

on 3.16, sorting by name seems to be working. but sorting by activity is totally random

on 3.17.1, still sorting by activity is random

@CvH
Copy link
Author

CvH commented Nov 8, 2021

still a problem at the latest official version currently available 3.18.1

@ankar84
Copy link

ankar84 commented Nov 18, 2021

3.18.2 same issue

@CvH
Copy link
Author

CvH commented Jan 10, 2022

4.3.1 same issue

@ankar84
Copy link

ankar84 commented Jan 11, 2022

@dudanogueira @debdutdeb please take a look at that issue.
It's not so critical in functionality aspect, it's a UI\UX bug, but very annoying to users.

@AmiKonst
Copy link

So. Where is the solution?

@CvH
Copy link
Author

CvH commented Dec 9, 2022

5.4 same issue

@debdutdeb debdutdeb added the contrib: good first issue Issues that you can solve to start contributing :) label Dec 9, 2022
@WYGIN
Copy link

WYGIN commented Jan 8, 2023

@dudanogueira assign this issue to me i will commit & will i need to sort members by name or username

@varun-s22
Copy link

varun-s22 commented Jan 10, 2023

@debdutdeb Hey there.. is this issue still open?
can i take it?

@kartikbh6614
Copy link

I want to work on this issue please assign me this issue

@Srishti-j18
Copy link

Hi, I want to work on this issue, can you please assign me this issue?

@Vip2799
Copy link

Vip2799 commented Jan 29, 2023

I would like to solve this issue. please assign me this issue

@Karan-Bhatta
Copy link

Hi there, I want to work to fix this issue. But this is what I am getting while cloning
Capture

@debdutdeb
Copy link
Member

Anybody wanting to work on this, please go ahead; no need to assign to anybody. Thanks.

@debdutdeb
Copy link
Member

Hi there, I want to work to fix this issue. But this is what I am getting while cloning Capture

Is this wsl?

@Rishabhg71
Copy link

Hi there, I want to work to fix this issue. But this is what I am getting while cloning Capture

you need to clone the repo inside WSL if on windows
it seems you are on git bash terminal

@dharmvir73
Copy link

I want to work on this issue please assign me this issue.

@Gua00va
Copy link

Gua00va commented Feb 15, 2023

Hey!! I want to work on this issue. I'm new here so I'm really excited to start contributing.

@eshan-003
Copy link

Hey Please Assign this issue to me @debdutdeb . I want to work on this

@dudanogueira
Copy link
Contributor

Folks, again, no need to assign. If you want to work on this, the path would be:
1 - Propose a good sorting
2 - Identify where the current code is
3 - Explain how you want to fix
4 - Code/Improve the PR
5 - Submit to review
6 - If not approved/merge, back to 4

Consider that it uses this api to grab the list of members:
https://developer.rocket.chat/reference/api/rest-api/endpoints/core-endpoints/channels-endpoints/members

API.v1.addRoute(
'channels.members',
{ authRequired: true },
{
async get() {
const findResult = findChannelByIdOrName({
params: this.requestParams(),
checkedArchived: false,
});
if (findResult.broadcast && !hasPermission(this.userId, 'view-broadcast-member-list', findResult._id)) {
return API.v1.unauthorized();
}
const { offset: skip, count: limit } = this.getPaginationItems();
const { sort = {} } = this.parseJsonQuery();
check(
this.queryParams,
Match.ObjectIncluding({
status: Match.Maybe([String]),
filter: Match.Maybe(String),
}),
);
const { status, filter } = this.queryParams;
const { cursor, totalCount } = findUsersOfRoom({
rid: findResult._id,
...(status && { status: { $in: status } }),
skip,
limit,
filter,
...(sort?.username && { sort: { username: sort.username } }),
});

Keanby added a commit to Keanby/Rocket.Chat that referenced this issue May 20, 2023
@sujaltangde
Copy link

I would like to contribute on this issue please assign it to me

@CvH
Copy link
Author

CvH commented Jun 20, 2023

@sujaltangde
#22145 (comment)

Folks, again, no need to assign. If you want to work on this, the path would be: 1 - Propose a good sorting 2 - Identify where the current code is 3 - Explain how you want to fix 4 - Code/Improve the PR 5 - Submit to review 6 - If not approved/merge, back to 4

@zero-commit
Copy link

can somebody help me find where this code is lying

@divyanshu255
Copy link

hello,i think i can fix this .please, assign it to me.

@harshbsharma
Copy link

Would like to work on it. Please assign

@SHIVAM-lab
Copy link

I will fix this , assign this issue to me

@debdutdeb
Copy link
Member

@sujaltangde #22145 (comment)

Folks, again, no need to assign. If you want to work on this, the path would be: 1 - Propose a good sorting 2 - Identify where the current code is 3 - Explain how you want to fix 4 - Code/Improve the PR 5 - Submit to review 6 - If not approved/merge, back to 4

Please read this 🙏🏼

@thebluespecs thebluespecs linked a pull request Nov 3, 2023 that will close this issue
@Jatingupta9120
Copy link

hey Is the issue still open i would like to work upon the issue please assign this issue to me.

@mahmoodshariff123
Copy link

hey is this issue still open?plz assign it to me if it is not closed

@mohitejaikumar mohitejaikumar linked a pull request Oct 12, 2024 that will close this issue
@Arihant25
Copy link

This issue seems fixed should it be closed now?

@SaraswatSahoo
Copy link

hey I have fixed this issue and made a pull request for it please review the PR #34141

@Curious-Goblin
Copy link

I think, in the latest version of Rocket chat the issue is fixed already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment