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

User list is incomplete or wrongly sorted #31839

Closed
KuenzelIT opened this issue Jun 20, 2018 · 9 comments
Closed

User list is incomplete or wrongly sorted #31839

KuenzelIT opened this issue Jun 20, 2018 · 9 comments

Comments

@KuenzelIT
Copy link

Steps to reproduce

  1. Go to the users panel.
  2. Select "Everyone".

Expected behaviour

I expect every single user to be listed sorted by name, e.g. from A-F and after scrolling down to the end also G-N and so on.

Actual behaviour

I see 200 users from A to Z with a lot of users missing in between. If I scroll down to the end, another 200 users get loaded and integrated into the list, but the user I'm searching for (in the list! without search function) is still not there.

So I have to use the search function, which does not help if I'm comparing with other users or I have to scroll down multiple times until all ~1200 users were loaded.

Server configuration

Operating system:
CentOS

Web server:
Apache

Database:
mysql

PHP version:
7.1.15

ownCloud version: (see ownCloud admin page)
10.0.8

List of activated apps:
Enabled:

  • configreport: 0.1.1
  • dav: 0.3.2
  • federatedfilesharing: 0.3.1
  • files: 1.5.1
  • files_external: 0.7.1
  • files_sharing: 0.10.1
  • files_texteditor: 2.2.1
  • files_trashbin: 0.9.1
  • files_videoplayer: 0.9.8
  • guests: 0.5.0
  • impersonate: 0.2.0
  • market: 0.2.4
  • notifications: 0.3.3
  • onlyoffice: 1.3.0
  • provisioning_api: 0.5.0
  • templateeditor: 0.3
  • updatenotification: 0.2.1
  • user_ldap: 0.11.0

Are you using external storage, if yes which one:
no

Are you using encryption:
no

Are you using an external user-backend, if yes which one:
LDAP

I couldn't find any other issues on this and it seems really strange to have a user list which looks complete (users from A-Z) but isn't.

Thanks!

@ownclouders
Copy link
Contributor

GitMate.io thinks possibly related issues are #29772 ([FR] Add creation date to user listing), #20644 (User list unresponsible), #22550 (Unable to view the list of users), #6331 (Users list should show currently used space), and #5345 (List of shares is incomplete after reshare).

@phil-davis
Copy link
Contributor

PR #31599 is one attempt to alleviate this.
and comment at #1948 (comment)
Enjoy reading the discussions. If you have a better idea for a solution, I would love to hear it :)

@phil-davis
Copy link
Contributor

@PVince81 this is just what has been discussed recently.

@PVince81
Copy link
Contributor

Hmm, do many users on the first page have special characters ? As far as I know we also sort on the DB backend but not using natural sort. The frontend sorts with natural sort. Maybe this is messing up the order.

Sorting by display name as per #31599 will not help with pagination anyway. Maybe we settle on non-natural sort so we can have the DB be the authority on sort order. (AFAIK natural sort on different DBs work differently so there is no common solution for this)

@PVince81
Copy link
Contributor

After page refresh:

natural sort:
image

regular sort:
image

Regular sort is achieved with this quick patch on top of v10.0.8

diff --git a/settings/js/users/users.js b/settings/js/users/users.js
index e0edb28271..ecc1e6cfef 100644
--- a/settings/js/users/users.js
+++ b/settings/js/users/users.js
@@ -268,11 +268,7 @@ var UserList = {
                        // better use a data attribute
                        a = $(a).find('.name').text();
                        b = $(b).find('.name').text();
-                       var firstSort = UserList.preSortSearchString(a, b);
-                       if(typeof firstSort !== 'undefined') {
-                               return firstSort;
-                       }
-                       return OC.Util.naturalSortCompare(a, b);
+                       return a - b;
                });
 
                var items = [];

@PVince81
Copy link
Contributor

@KuenzelIT if you like you could try with the above patch and see if this solves the pagination problem.

@phil-davis
Copy link
Contributor

phil-davis commented Jun 20, 2018

Also, @KuenzelIT are your user-ids and their display names / full names quite different?
e.g. userid a000001 and display name "Violet Davis"

If so, then the current code will only send "Violet Davis" to the front-end UI when you have scrolled down enough times for display-names "V*" to be sent from the back-end. At that point, a000001 will suddenly appear sorted up the top of the list on the UI.

@KuenzelIT
Copy link
Author

Hi guys,

sorry for the late response.

Also, @KuenzelIT are your user-ids and their display names / full names quite different?

Yes, they can be pretty different since userIDs are based on the last name while the display names contain firstname and lastname.

I now get why this is not that easy to solve.

Thank you guys for your help and explanations!

I'm closing this since the other issues already contain this topic.

@lock
Copy link

lock bot commented Jul 30, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants