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

Sorting of users #3230

Closed
KB7777 opened this issue Jan 24, 2017 · 14 comments
Closed

Sorting of users #3230

KB7777 opened this issue Jan 24, 2017 · 14 comments
Labels
1. to develop Accepted and waiting to be taken care of enhancement feature: users and groups

Comments

@KB7777
Copy link
Contributor

KB7777 commented Jan 24, 2017

It would be great to have sorting users feature by the last login date or quota set. LDAP users either :)

Regards.

@MorrisJobke MorrisJobke added 0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement feature: users and groups labels Jan 25, 2017
@MorrisJobke
Copy link
Member

cc @blizzz @jancborchardt

@MorrisJobke
Copy link
Member

ref #117

@MorrisJobke MorrisJobke removed the 0. Needs triage Pending check for reproducibility or if it fits our roadmap label Apr 5, 2017
@MorrisJobke MorrisJobke changed the title [feature] Sort users by last login date or quota set Sort users by last login date or quota set Apr 5, 2017
@jancborchardt
Copy link
Member

Yup, should be possible to sort by the headers where it makes sense. For those two columns for sure. :)

@blizzz @icewind1991

@blizzz
Copy link
Member

blizzz commented Jun 13, 2017

TL;DR: The only valid approach to this is to Client-side sorting in Javascript, with the disadvantage that you do not have complete results, only that what you already see. If this is good enough, should not be much of a problem.

Long story

How its describes is also how sorting in Files work. With the difference that all files are retrieved in background. Which is not possible for users (too many, far too slow).

In general, you can pick between two approaches:

Client side sorting

Advantage: fast, no server interaction

Disadvantage: may be incomplete, sorts only the rows that are present

Server side sorting

Background: for the provided cols, looking at preferences table is sufficient (needs to ask user backends for meta data still).

Advantage: If trying hard enough, you get a complete picture…

Disadvantage: requires server interaction → slow. Won't retrieve users without rows set, (unless you ask user backends first for all! users – no-go on big instances). Even slower (must match results from preferences table and user backends), and most likely breaks paging, is the combination with a search filter (you will have gaps and never know whether there are more users to retrieve).

@skjnldsv skjnldsv self-assigned this May 22, 2018
@skjnldsv skjnldsv added the 1. to develop Accepted and waiting to be taken care of label May 22, 2018
@nextcloud-bot nextcloud-bot added the stale Ticket or PR with no recent activity label Jun 22, 2018
@skjnldsv skjnldsv removed stale Ticket or PR with no recent activity labels Jun 12, 2019
@alexanderdd
Copy link
Contributor

From what I read, I think it should be server side, so it also works for big instances (including LDAP).

It's better to have a feature that works for all instances, including big ones, instead of having a feature (client side sorting) that only works well on small instances where only the rows that you already see are sorted.

Background: Sorting by last login is an important feature for admins, especially looking at those that never logged in, cause you might wanna delete them/contact them.

@skjnldsv skjnldsv removed their assignment Jul 5, 2021
@alexanderdd
Copy link
Contributor

Please implement this feature.

I just wanted to remove old users from my intance and can still not sort by last login date, Nextcloud 23.0.8

@skjnldsv @MorrisJobke ? Or who should I tag?

@jospoortvliet
Copy link
Member

jospoortvliet commented Nov 11, 2022

Hi @alexanderdd,
pinging people is sadly not really what gets it implemented ;-)

Somebody doing it in their free time is, or somebody getting paid to do it. Looking at Arthur's input, it is probably a fair bit of work that comes with downsides on the server performance, so extra work might be needed to avoid that before it could go in. This doesn't sound to me like a feature a volunteer would work on as it's not really a home user thing, so your best bet is probably to either pay somebody or do it yourself.

Either way, please avoid bothering people about it - that's just not polite and certainly doesn't create a motivation to help. There are thousands of other things that need doing I'm afraid and most of those have far more than 8 👍🏻 and user impact.

I hope this'll work out for you.

@joshtrichards joshtrichards changed the title Sort users by last login date or quota set Sorting of users May 21, 2024
@joshtrichards
Copy link
Member

Related PR: #45245

@Pytal
Copy link
Member

Pytal commented Jul 29, 2024

A separate "Recently active" section has been added which sorts users by last login: #45716

If sorting by a different field is desired feel free to open a new issue :)

@Pytal Pytal closed this as completed Jul 29, 2024
@alexanderdd
Copy link
Contributor

@Pytal thank you for working on this! In a 29.0.3 test install, I see the Last login column, but there is no way to sort ascending/descending... did I miss something? Or will it come in NC 30?

(I only have two users on that instance, does sorting only work when there are many users? On another 28.0.7 install with many users, there is no sorting)

@joshtrichards
Copy link
Member

joshtrichards commented Jul 30, 2024

@alexanderdd It's a new feature so it'll only make it into upcoming majors. Only bug fixes get backported. :)

@Pytal
Copy link
Member

Pytal commented Jul 30, 2024

@Pytal thank you for working on this! In a 29.0.3 test install, I see the Last login column, but there is no way to sort ascending/descending... did I miss something? Or will it come in NC 30?

You're welcome :)

As said this is only for NC30 and is actually a separate section see:
image

@alexanderdd
Copy link
Contributor

But then it does not close this issue here, because it asks for "sorting users feature by the last login date or quota set", I think what is asked (and what I also find useful) is that in the regular "all accounts" section, you click on one of the headers of a table column, and it sorts the users by that column, e.g. last login date, quota, language, ... It should be server side sorting (see discussion above).

I think I will reopen this issue, unless you protest?!

@Pytal
Copy link
Member

Pytal commented Aug 1, 2024

Due to technical limitations with e.g. LDAP it was concluded that having last login sort in a separate section rather than the header buttons is the best and cleanest way

For other fields it may be feasible. Feel free to open a separate issue for those!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of enhancement feature: users and groups
Projects
None yet
Development

No branches or pull requests

10 participants