Bug 9969

Summary: Display target:task correctly on build dashboard (and elsewhere)
Product: [Build System, Metadata & Runtime] Toaster Reporter: Elliot Smith <elliot.smith>
Component: toasterAssignee: Toaster default assignee <toaster>
Status: ACCEPTED --- QA Contact:
Severity: normal    
Priority: Medium CC: belen.barros.pena, brian.avery, david.reyna, jessica.zhang, jose.perez.carranza, stanciux.mihail
Version: 2.3   
Target Milestone: Future   
Hardware: x86   
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: 9631    
Bug Blocks:    
Attachments:
Description Flags
Design - Show tasks when specified none

Description Elliot Smith 2016-07-18 10:02:29 UTC
The display of target:task in the build dashboard, all builds, project builds etc. pages is inconsistent and poorly-implemented.

Because different model and template methods are used in different places, in some parts of the application, we show the target only (e.g. title for build dashboard), while in others we show target + task (e.g. all builds table).

Places where this is definitely needed:

bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html
bitbake/lib/toaster/toastergui/templates/builddashboard.html
bitbake/lib/toaster/toastergui/templates/basebuildpage.html
bitbake/lib/toaster/toastergui/templates/target.html

(NB the mrb section also displays target:task, but this is now fetched from the mostrecentbuilds API - see below.)

The fixes for 9631 include an API for getting recent builds data (mostrecentbuilds), which has some code for creating the target:task list. We also have a Build.get_sorted_targets_list() method which does part of the job.

Rationalise the code from those two places and move it to the Build model (perhaps with a custom template tag which we can also call from the mostrecentbuilds API); then apply across all parts of Toaster where we should be showing "target:task, target:task, ...".
Comment 1 Belen Barros Pena 2016-07-18 16:55:07 UTC
Created attachment 3289 [details]
Design - Show tasks when specified