Bug 9117

Summary: Allow "project builds" and "all builds" to be sorted by time and recipe name
Product: [Build System, Metadata & Runtime] Toaster Reporter: Elliot Smith <elliot.smith>
Component: toasterAssignee: Toaster default assignee <toaster>
Status: NEW --- QA Contact: yeoh ee peng <ee.peng.yeoh>
Severity: normal    
Priority: Low CC: belen.barros.pena, david.reyna, jessica.zhang, jose.perez.carranza, stanciux.mihail
Version: unspecified   
Target Milestone: Future   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Elliot Smith 2016-02-15 16:44:10 UTC
When the "builds" tables were converted to ToasterTable, the recipe name sort was removed as it depended on a derived property (recipe__name), and ToasterTable doesn't support sorting by derived properties.

The time sort was already disabled on the "builds" tables, but this also needs to be put back in. Again, this is a derived field.

The same approach taken for number of errors and number of warnings (for the Builds table) might be possible, where derived fields are added to the objects in the queryset via annotations. A queryset can be sorted by a field which is an annotation. However, most examples of annotation use counts, rather than calculations on existing fields on a model.