Bug 4255

Summary: builds: Sort the content of the builds table
Product: [Build System, Metadata & Runtime] Toaster Reporter: Belen Barros Pena <belen.barros.pena>
Component: toasterAssignee: Alexandru Damian <alexandru.damian>
Status: VERIFIED FIXED QA Contact: Yuan Sun <Yuan.Sun2>
Severity: enhancement    
Priority: Medium CC: alexandru.damian, david.reyna, jessica.zhang, Yuan.Sun2
Version: unspecified   
Target Milestone: 1.6 M4   
Hardware: All   
OS: Multiple   
Whiteboard: GUI design available
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Bug Depends on:    
Bug Blocks: 4719    
Attachments:
Description Flags
Sorting the "All builds" table
none
Sorting the "All builds" table
none
Sorting the "All builds" table
none
Sorting the "All builds" table
none
Sorting the "All builds" table none

Description Belen Barros Pena 2013-04-11 13:47:48 UTC
I should be able to sort the content of the builds table using the columns shown as sorting criteria (whenever the nature of the column information lends itself to sorting). 

The specifics of the sorting behaviour for each column are TBC.
Comment 1 Belen Barros Pena 2013-07-25 13:54:28 UTC
Created attachment 1357 [details]
Sorting the "All builds" table
Comment 2 Belen Barros Pena 2013-08-02 10:26:08 UTC
Created attachment 1398 [details]
Sorting the "All builds" table
Comment 3 Alexandru Damian 2013-08-07 10:33:24 UTC
Back-end data interface and API implemented.

Docs should reflect available API and GUI usage.
Comment 4 Belen Barros Pena 2013-08-16 13:12:10 UTC
Created attachment 1431 [details]
Sorting the "All builds" table
Comment 5 Belen Barros Pena 2014-01-15 11:57:38 UTC
Created attachment 1728 [details]
Sorting the "All builds" table

We have agreed that the "Failed tasks" column should not be sortable. Updating the document accordingly.
Comment 6 Alexandru Damian 2014-02-12 12:39:31 UTC
I believe that the feature works as designed.
Comment 7 Belen Barros Pena 2014-02-21 11:33:35 UTC
There are still a few issues with the sorting in this table. I am going to reopen as a way to keep track of them. If you rather do something different, let me know.

In master:54562006c1327c5b99daa4cc05a3ba7e38412da1

Issues:

* We need to apply the ‘sorted’ style to the applied sorting

* The default sorting applied when you load the table should be "Completed on" in inverse chronological order (earliest build on top), so caret up. Right now, it is sorted in chronological order (oldest build on top)

* When used as secondary sorting criteria, "Completed on" show sort builds in inverse chronological order (right now it sorts in chronological order)

* The sorting only seems to sort the content of a single page. This is not the right behaviour. If I am in page 4 and then sort, I should be brought back to page 1.

* When a filter returns no results, the search field is empty but shows the clear button. The clear button should never show when the search field is empty.
Comment 8 Belen Barros Pena 2014-02-24 16:28:00 UTC
All fixed, except for
> 
> * When used as secondary sorting criteria, "Completed on" show sort builds
> in inverse chronological order (right now it sorts in chronological order)

This is still not working (showing the oldest build on top, instead of the newest one).
Comment 9 Yuan Sun 2014-03-13 03:22:02 UTC
Testcase 901 is created for the feature.

https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=901
Comment 10 Yuan Sun 2014-03-20 07:19:20 UTC
Verified in 1f16ca9fba325f5ddbb1edad5bbad78d990de5e0.
Comment 11 Belen Barros Pena 2014-03-28 09:58:28 UTC
Created attachment 1863 [details]
Sorting the "All builds" table

Removing the "Weird interactions with filters" section for the "Errors" and "Warnings" columns (pp 9 and 10), since the number of errors/warnings and the secondary sorting criteria take care of the situation perfectly well.