Bug 1115549 - [AAA] Sort list of domains alphabetically
Summary: [AAA] Sort list of domains alphabetically
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-core
Version: 3.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.5.0
Assignee: Mooli Tayer
QA Contact: Jiri Belka
URL:
Whiteboard: infra
Depends On:
Blocks: oVirt-AAA-rewrite
TreeView+ depends on / blocked
 
Reported: 2014-07-02 15:10 UTC by Ondra Machacek
Modified: 2016-02-10 19:34 UTC (History)
10 users (show)

Fixed In Version: ovirt-3.5.0-beta1.1
Clone Of:
Environment:
Last Closed: 2014-10-17 12:23:17 UTC
oVirt Team: Infra
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 29721 0 master MERGED aaa: sort domain names a-b ascending. Never
oVirt gerrit 29774 0 None None None Never
oVirt gerrit 29991 0 None None None Never
oVirt gerrit 30015 0 None None None Never
oVirt gerrit 30016 0 None None None Never
oVirt gerrit 30017 0 ovirt-engine-3.5 MERGED aaa: sort domain names a-b ascending. Never

Description Ondra Machacek 2014-07-02 15:10:48 UTC
Description of problem:


Version-Release number of selected component (if applicable):
ovirt-engine-backend-3.5.0-0.0.master.20140629172257.git0b16ed7.el6.noarch

How reproducible:
always

Steps to Reproduce:
1. add more domains to engine.
2. check how they are sorted in login dialog.

Actual results:
random

Expected results:
alphabetically sorted

Additional info:

Comment 1 Oved Ourfali 2014-07-03 12:39:37 UTC
I think there is some logic of what's the last domain you chose.
Einav - any clue about that?

Comment 2 Einav Cohen 2014-07-03 13:15:14 UTC
(In reply to Oved Ourfali from comment #1)
> I think there is some logic of what's the last domain you chose.
> Einav - any clue about that?

not sure, but in any case - the last domain you chose is affecting only the selected item, not the order of all of the items in the drop-down. 
[the automatically-selected item is not necessarily the first one in the drop down - you can have in the drop down 'domain1', 'domain2' and 'domain3', and 'domain2' (i.e. the second item in the drop-down) will be selected by default, (since it is the lastly selected or similar) - however, this BZ is about 'domain1', 'domain2' and 'domain3' not being alphabetically ordered, regardless of the selected item].

Comment 3 Mooli Tayer 2014-07-08 16:02:11 UTC
Hi,

I can see a commit[1] from 15/01/14 adding sorting (a-b ascending, 'internal' always last).

I tested master and indeed domains are sorted at login screen.

Comment 5 Juan Hernández 2014-07-08 16:11:47 UTC
The GetDomainList query isn't now used by the GUI, only by the RESTAPI. The GUI uses now GetAAAProfileList.

Comment 6 Mooli Tayer 2014-07-08 16:31:43 UTC
I can see that now, thanks.

Looks like a change in needed in light of comment 5.

Comment 7 Alon Bar-Lev 2014-07-09 05:20:36 UTC
(In reply to Mooli Tayer from comment #6)
> I can see that now, thanks.
> 
> Looks like a change in needed in light of comment 5.

yes, I think it was a mistake sort() was not done at the get profile list.

but we should remove the internal exception in sort at all cases, there is no reason to do so.

thanks for the patch! but I think yair should be assigned or at least be CCed to any AAA change.

Comment 8 Oved Ourfali 2014-07-09 05:24:27 UTC
(In reply to Juan Hernández from comment #5)
> The GetDomainList query isn't now used by the GUI, only by the RESTAPI. The
> GUI uses now GetAAAProfileList.

So should REST use the new query as well?

Comment 9 Alon Bar-Lev 2014-07-09 05:44:34 UTC
(In reply to Oved Ourfali from comment #8)
> (In reply to Juan Hernández from comment #5)
> > The GetDomainList query isn't now used by the GUI, only by the RESTAPI. The
> > GUI uses now GetAAAProfileList.
> 
> So should REST use the new query as well?

no, rest is listing the directories (authz) not the profiles.

Comment 10 Mooli Tayer 2014-07-14 09:55:59 UTC
pending 3.5 backport.

Comment 11 Jiri Belka 2014-08-08 12:53:48 UTC
ok, ovirt-engine-backend-3.5.0-0.0.master.20140804172041.git23b558e.el6.noarch

domains are listed alphabetically.

Comment 12 Sandro Bonazzola 2014-10-17 12:23:17 UTC
oVirt 3.5 has been released and should include the fix for this issue.


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