Skip to content
This repository has been archived by the owner on Dec 3, 2019. It is now read-only.

[Feature Request] Group Sorting #14

Open
TJHeeringa opened this issue Mar 28, 2018 · 3 comments
Open

[Feature Request] Group Sorting #14

TJHeeringa opened this issue Mar 28, 2018 · 3 comments
Labels
enhancement New feature or request

Comments

@TJHeeringa
Copy link

Steps to reproduce

  1. Signin as Admin
  2. Press dropdown menu
  3. Open Users
  4. Observe the order of Groups

Expected behaviour

Groups are shown in alphabetical order.

Actual behaviour

Groups are shown in reverse-size order(sorted descending on number of members).

Server configuration

Operating system:
Ubuntu 16.04
Web server:
Nginx
Database:
MySql
PHP version:
7.1.2
ownCloud version: (see ownCloud admin page)
10.7
Updated from an older ownCloud or fresh install:
Updated
Where did you install ownCloud from:
ownCloud repo
Signing status (ownCloud 9.0 and above):
Admin

Client configuration

Browser:
Firefox Quantum
Operating system:
Windows 10

@phil-davis
Copy link
Contributor

  • Add an option somewhere, that lets you choose the sort order, by reverse size or alpha.

Original core issue owncloud/core#30946

@TJHeeringa
Copy link
Author

Below the section with the group list there is a settings menu. Since sorting is done based on the data-sort-groups property of the list, altering the sort function to include an option for data-sort-groups===2, which causes the function to sort alphanumerically, would fix the feature request.

Things to do:

  • add additional check under settings
    • pressing the check changes data-sort-groups from 1 to 2 or back
    • saves the value of data-sort-groups to the config
    • calls GroupList.sortGroups
  • alter sort group function to check for
    • if data-sort-groups===2 sort alphanumerically
    • if data-sort-groups===1 sort reverse size order
    • if data-sort-groups===0 sort some default
  • alter user_management/lib/Controller/PageController.php line 130 to take sortGroupBy from this->config

@TJHeeringa
Copy link
Author

A less elegant solution would be to enforce alphanumerical sorting is by changing in user_management/lib/MetaData.php line 33 from const SORT_USERCOUNT = 1; to const SORT_USERCOUNT = 2;.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants