Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1537474

Summary: WebAdmin - Alerts list is in ascending order
Product: [oVirt] ovirt-engine Reporter: Yosi Ben Shimon <ybenshim>
Component: Frontend.WebAdminAssignee: Vojtech Szocs <vszocs>
Status: CLOSED CURRENTRELEASE QA Contact: Lucie Leistnerova <lleistne>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.1.9CC: awels, bugs, gshereme, lleistne, lsvaty, lveyde, mperina, tjelinek, tnisan, vszocs, ybenshim
Target Milestone: ovirt-4.2.2Flags: rule-engine: ovirt-4.2+
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.2.2.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-29 11:20:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: UX RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
webadmin alert list none

Description Yosi Ben Shimon 2018-01-23 09:52:00 UTC
Created attachment 1384784 [details]
webadmin alert list

Description of problem:
In WebAdmin, the Alerts list is in ascending order and the "last message" text in the title actually shows the first message.
That is in contrast to the Events list which is in descending order.
See attached screen shot.

Version-Release number of selected component (if applicable):
Red Hat Virtualization Manager Version: 4.1.9.1-0.1.el7

How reproducible:
always.

Steps to Reproduce:
1. Click the "Alerts" tab at the bottom
2. Expend the view using the up & down arrows button at the bottom right corner.
3.

Actual results:
The Alerts list is in ascending order and the "last message" is actually the first.

Expected results:
The Alerts list is in descending order and the "last message" shows the last message.


Additional info:

Comment 1 Tal Nisan 2018-01-23 12:55:28 UTC
How is that a storage bug?

Comment 4 Martin Perina 2018-01-29 10:10:14 UTC
Tomasi, could you please take a look?

Comment 5 Tomas Jelinek 2018-02-12 14:26:31 UTC
@Yosi: does this happen in the new UI as well?

Comment 6 Greg Sheremeta 2018-02-12 23:51:35 UTC
We had this regression before with a default sort getting applied to events when it shouldn't have been.

cc Alexander and Vojtech

Comment 7 Alexander Wels 2018-02-13 13:08:16 UTC
https://gerrit.ovirt.org/c/80544/ Caused the sorting issue

https://gerrit.ovirt.org/c/81228/ Fixed it for the events, but it appears alerts have their own list model, I guess the same thing needs to be applied to alerts.

Comment 8 Vojtech Szocs 2018-02-14 17:59:44 UTC
(In reply to Alexander Wels from comment #7)
> https://gerrit.ovirt.org/c/80544/ Caused the sorting issue
> 
> https://gerrit.ovirt.org/c/81228/ Fixed it for the events, but it appears
> alerts have their own list model, I guess the same thing needs to be applied
> to alerts.

The fix simply overrides hasItemsSorted() however it isn't consistent with (used by) sort handler logic [ColumnResizeCellTable.java] so if the user triggers column sort by clicking the column's header, the hasItemsSorted() override has no effect.

In other words, the fix only impacts the case when the grid is un-sorted. When the grid is (client-side) sorted by a column, default sort order still applies.

https://gerrit.ovirt.org/#/c/82064/ addresses the consistent default sort order on/off switch for a model.

Model for Alerts should override useDefaultItemComparator() to return false.

Comment 9 Martin Perina 2018-02-14 20:48:11 UTC
Vojto, moving the bug to you as not sure if some other patches will be needed

Comment 10 Vojtech Szocs 2018-02-15 13:38:33 UTC
(In reply to Martin Perina from comment #9)
> Vojto, moving the bug to you as not sure if some other patches will be needed

Hi, https://gerrit.ovirt.org/#/c/82064/ (master) is now merged, https://gerrit.ovirt.org/#/c/87740/ (ovirt-engine-4.2) is the backport. Those are all the remaining patches to make the default sort order control logic consistent for both unsorted and client-sorted grids.

Alexander's patches fix the immediate issue, I just wanted to ensure there isn't a logical discrepancy between unsorted and client-sorted grids, as both do use the default item Comparator (unless switched off, which should apply to both of these cases).

Comment 11 Lucie Leistnerova 2018-02-23 07:47:53 UTC
Order in Alerts and Events in Notification Drawer is descending.

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

Comment 12 Sandro Bonazzola 2018-03-29 11:20:15 UTC
This bugzilla is included in oVirt 4.2.2 release, published on March 28th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.2 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.