Steps to reproduce
- Create a table with at least two columns; one of them is a rating column, the other is some other sortable field
- Add a few items in the table. Rate one of the items, and then clear the rating. In the db (
oc_tables_row_cells_number), this is now a value of 0. Make sure that some of the items are not rated
- Sort the ratings in descending order, then sort another column.
Let's give a simple example
| number |
rating |
| 2 |
5 |
| 3 |
0 (previously rated) |
| 1 |
unrated (null) |
Sort by rating DESC, then NUMBER ASC
Expected behavior
The item that was rated and then unrated is treated equivalently to an item that is unrated. Secondary sort takes over
| number |
rating |
| 2 |
5 |
| 1 |
unrated (null) |
| 3 |
0 (previously rated) |
Actual behavior
The item that was rated and then unrated is treated above null
| number |
rating |
| 2 |
5 |
| 3 |
0 (previously rated) |
| 1 |
unrated (null) |
Attached, see a snippet of a real example I observed. Column 1 is a number, column 2 is a rating column. Sort is by priority (column 2), then duration. Fields that are 0 were rated then unrated.
26-09-03_04-44_Pending items.csv
Tables app version
2.3.0
Browser
Firefox 1.54.1
Client operating system
Linux
Operating system
Linux (Docker)
Web server
Apache
PHP engine version
Other
Database
PostgreSQL
Additional info
PHP 8.5.10. Image https://hub.docker.com/_/nextcloud.
Steps to reproduce
oc_tables_row_cells_number), this is now a value of 0. Make sure that some of the items are not ratedLet's give a simple example
Sort by rating DESC, then NUMBER ASC
Expected behavior
The item that was rated and then unrated is treated equivalently to an item that is unrated. Secondary sort takes over
Actual behavior
The item that was rated and then unrated is treated above null
Attached, see a snippet of a real example I observed. Column 1 is a number, column 2 is a rating column. Sort is by priority (column 2), then duration. Fields that are 0 were rated then unrated.
26-09-03_04-44_Pending items.csv
Tables app version
2.3.0
Browser
Firefox 1.54.1
Client operating system
Linux
Operating system
Linux (Docker)
Web server
Apache
PHP engine version
Other
Database
PostgreSQL
Additional info
PHP 8.5.10. Image https://hub.docker.com/_/nextcloud.