Bug 1273825 - Template sorting by version is broken
Summary: Template sorting by version is broken
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Frontend.WebAdmin
Version: 4.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.1.1
: 4.1.1
Assignee: jniederm
QA Contact: Lucie Leistnerova
URL:
Whiteboard:
Depends On: 1284973
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-21 10:50 UTC by jniederm
Modified: 2017-04-21 09:35 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-04-21 09:35:38 UTC
oVirt Team: Virt
Embargoed:
rule-engine: ovirt-4.1+
rule-engine: planning_ack+
rule-engine: devel_ack+
lsvaty: testing_ack+


Attachments (Terms of Use)
screenshot (10.60 KB, image/png)
2015-10-21 10:50 UTC, jniederm
no flags Details
bad_order (20.83 KB, image/png)
2016-12-15 15:54 UTC, Lucie Leistnerova
no flags Details
bad_order_2 (15.22 KB, image/png)
2017-01-16 14:56 UTC, Lucie Leistnerova
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 60469 0 master MERGED ui: Template version sort not working properly. 2016-07-11 14:12:06 UTC
oVirt gerrit 69221 0 master MERGED core: set blank template version 2016-12-28 09:09:51 UTC
oVirt gerrit 69225 0 ovirt-engine-4.1 MERGED core: set blank template version 2016-12-28 10:15:20 UTC
oVirt gerrit 70895 0 master MERGED core: Template sorting improved 2017-02-01 08:42:01 UTC
oVirt gerrit 70901 0 master MERGED core: Sorting by multiple db columns 2017-02-01 08:07:22 UTC
oVirt gerrit 71512 0 ovirt-engine-4.1 MERGED core: Sorting by multiple db columns 2017-02-06 11:46:29 UTC
oVirt gerrit 71513 0 ovirt-engine-4.1 MERGED core: Template sorting improved 2017-02-06 11:46:33 UTC

Description jniederm 2015-10-21 10:50:06 UTC
Created attachment 1085083 [details]
screenshot

Description of problem:
Templates main tab > sorting by version columns is broken

Version-Release number of selected component (if applicable):
4.0 master, commit 0614c05

How reproducible:
100%

Steps to Reproduce:
1. Create multiple sub-versions of one template
2. Sort templates by version column

Actual results:
(see screenshot), version are not sorted, the order remains same for both asc and desc

Expected results:
proper sorting

Comment 1 Michal Skrivanek 2016-04-22 14:46:39 UTC
pushed out due to capacity reasons

Comment 2 Sandro Bonazzola 2016-12-12 13:58:27 UTC
The fix for this issue should be included in oVirt 4.1.0 beta 1 released on December 1st. If not included please move back to modified.

Comment 3 Lucie Leistnerova 2016-12-15 15:53:48 UTC
Order changes, but it doesn't seem logical.

In DESC order template 'test' without version stays first. 
If there are template subversions with name then 'Blank' template goes between 'test' templates in ASC order.
See attachment.

tested in ovirt-engine-4.1.0-0.2.master.20161215130926.git1e1810e.el7.centos.noarch

Comment 4 Lucie Leistnerova 2016-12-15 15:54:33 UTC
Created attachment 1232239 [details]
bad_order

Comment 5 Lucie Leistnerova 2017-01-16 14:55:58 UTC
The behaviour is still not logical.

tested in ovirt-engine-webadmin-portal-4.1.0-0.4.master.20170115141203.git30e806b.el7.centos.noarch

Blank stays always first.
Template centos_7.3 is mixed with no subversion and subversions with Sub version names, last stays subversions with no Sub version names. And test_template is somewhere between.
It changes order of only the two last subversions with no Sub version name. 
See attachment.

There could by 2 ways of ordering: only by version or name + version. I prefer the second one.

So the order in my case should be

up:
Blank
centos_7.3
centos_7.3    (3)
centos_7.3    (5)
centos_7.3    aaa (4)
centos_7.3    bbb (2)
test_template

down:
test_template
centos_7.3    bbb (2)
centos_7.3    aaa (4)
centos_7.3    (5)
centos_7.3    (3)
centos_7.3
Blank

Comment 6 Lucie Leistnerova 2017-01-16 14:56:37 UTC
Created attachment 1241256 [details]
bad_order_2

Comment 7 jniederm 2017-01-20 18:17:45 UTC
Intended behavior:
* when 'Name' column is clicked, rows are sorted by base template name, then by version name, then by version number.
* when 'Version' column is clicked, rows are sorted by base template name, then by version number

Comment 8 Lucie Leistnerova 2017-01-23 08:32:54 UTC
Thank you for the explanation.

So it should be:

up:
Blank
centos_7.3
centos_7.3    bbb (2)
centos_7.3    (3)
centos_7.3    aaa (4)
centos_7.3    (5)
test_template

down:
test_template
centos_7.3    (5)
centos_7.3    aaa (4)
centos_7.3    (3)
centos_7.3    bbb (2)
centos_7.3
Blank

Comment 9 Arik 2017-01-25 15:42:05 UTC
Jakub, I discussed this with Eldan and it doesn't make much sense to make the version column sortable. In reality we don't expect people to have more than 5-10 versions (how many sub-version are relevant for a specific template? when you reach 10 versions, the older versions could probably be removed). Maybe a better solution would be to simply prevent sorting by the template's version?

Comment 10 jniederm 2017-01-25 16:12:58 UTC
I swapped the second sorting criterion so currently the patch is like this:
[Name] -> base name, version number
[Version] -> base name, version name, version number

I agree that sorting by version name may not be useful that often but based on discussion with QE I suggest to keep that functionally. Especially when it's basically done and so effortless.

Comment 11 jniederm 2017-01-31 14:48:14 UTC
Based on conversation with Eldan the solution should be:
* Version column won't be sortable to not confuse users
* Name column will sort by base version name, then version name (and since there may be two subversions of the same name then even by version number).

Comment 12 Sandro Bonazzola 2017-02-01 16:02:15 UTC
oVirt 4.1.0 GA has been released, re-targeting to 4.1.1.
Please check if this issue is correctly targeted or already included in 4.1.0.

Comment 13 Lucie Leistnerova 2017-02-13 13:49:15 UTC
Can't order by Version.
Order by Name changes the order as expected.

verified in ovirt-engine-webadmin-portal-4.1.1-0.1.el7.noarch


Note You need to log in before you can comment on or make changes to this bug.